/* Base Button: Material 3 */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;           /* M3 spacing */
    border-radius: 12px;               /* rounded corners */
    font-size: 1rem;                   /* 16px */
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;

    /* Colors */
    background-color: #50a468;         /* Primary color */
    color: #ffffff;                     /* Text color */

    /* Shadow / Elevation */
    box-shadow: 0px 1px 3px rgba(0,0,0,0.2), 0px 1px 2px rgba(0,0,0,0.14), 0px 2px 1px rgba(0,0,0,0.12);

    /* Transitions */
    transition: background-color 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Hover Effect */
.button:hover {
    background-color: #61c27d;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.25), 0px 2px 4px rgba(0,0,0,0.20);
    transform: translateY(-1px);
}

/* Active / Pressed */
.button:active {
    background-color: #3fa059;
    box-shadow: 0px 2px 3px rgba(0,0,0,0.2), 0px 1px 1px rgba(0,0,0,0.14);
    transform: translateY(1px);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .button {
        background-color: #50a468;
        color: #1a1a1a;
        box-shadow: 0px 1px 3px rgba(0,0,0,0.5), 0px 1px 2px rgba(0,0,0,0.4), 0px 2px 1px rgba(0,0,0,0.35);
    }

    .button:hover {
        background-color: #a6ffb9;
        box-shadow: 0px 4px 6px rgba(0,0,0,0.6), 0px 2px 4px rgba(0,0,0,0.55);
    }

    .button:active {
        background-color: #6eff86;
        box-shadow: 0px 2px 3px rgba(0,0,0,0.5), 0px 1px 1px rgba(0,0,0,0.45);
    }
}

/* Ripple Effect (Optional Material Touch Feedback) */
.button::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s, opacity 0.3s;
}

.button:active::after {
    transform: scale(1);
    opacity: 1;
    transition: 0s;
}

/* Mobile Adjustments */
@media screen and (max-width: 480px) {
    .button {
        padding: 0.5rem 1.2rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
}