/* Material 3 Design System CSS */

/* Android Material 3 Color Tokens - Professional */
:root {
    /* Primary Colors - Android Blue */
    --md-sys-color-primary: #1976D2;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #E3F2FD;
    --md-sys-color-on-primary-container: #0D47A1;

    /* Secondary Colors - Professional Gray */
    --md-sys-color-secondary: #455A64;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #ECEFF1;
    --md-sys-color-on-secondary-container: #263238;

    /* Tertiary Colors - Accent Green */
    --md-sys-color-tertiary: #388E3C;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #E8F5E8;
    --md-sys-color-on-tertiary-container: #1B5E20;

    /* Error Colors */
    --md-sys-color-error: #D32F2F;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFEBEE;
    --md-sys-color-on-error-container: #B71C1C;

    /* Surface Colors - Clean Android Palette */
    --md-sys-color-surface: #FAFAFA;
    --md-sys-color-on-surface: #212121;
    --md-sys-color-surface-variant: #F5F5F5;
    --md-sys-color-on-surface-variant: #616161;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F8F9FA;
    --md-sys-color-surface-container: #F5F5F5;
    --md-sys-color-surface-container-high: #EEEEEE;
    --md-sys-color-surface-container-highest: #E0E0E0;

    /* Outline Colors */
    --md-sys-color-outline: #9E9E9E;
    --md-sys-color-outline-variant: #E0E0E0;

    /* Android Spacing System */
    --md-sys-spacing-xs: 4px;
    --md-sys-spacing-sm: 8px;
    --md-sys-spacing-md: 16px;
    --md-sys-spacing-lg: 24px;
    --md-sys-spacing-xl: 32px;
    --md-sys-spacing-xxl: 48px;

    /* Android Material 3 Elevation - Professional Shadows */
    --md-sys-elevation-level0: none;
    --md-sys-elevation-level1: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 2px rgba(0, 0, 0, 0.24);
    --md-sys-elevation-level2: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23);
    --md-sys-elevation-level3: 0px 6px 12px rgba(0, 0, 0, 0.19), 0px 6px 6px rgba(0, 0, 0, 0.23);
    --md-sys-elevation-level4: 0px 10px 20px rgba(0, 0, 0, 0.19), 0px 6px 6px rgba(0, 0, 0, 0.23);
    --md-sys-elevation-level5: 0px 15px 25px rgba(0, 0, 0, 0.25), 0px 15px 10px rgba(0, 0, 0, 0.22);

    /* Typography */
    --md-sys-typescale-display-large-size: 57px;
    --md-sys-typescale-display-medium-size: 45px;
    --md-sys-typescale-display-small-size: 36px;
    --md-sys-typescale-headline-large-size: 32px;
    --md-sys-typescale-headline-medium-size: 28px;
    --md-sys-typescale-headline-small-size: 24px;
    --md-sys-typescale-title-large-size: 22px;
    --md-sys-typescale-title-medium-size: 16px;
    --md-sys-typescale-title-small-size: 14px;
    --md-sys-typescale-body-large-size: 16px;
    --md-sys-typescale-body-medium-size: 14px;
    --md-sys-typescale-body-small-size: 12px;
    --md-sys-typescale-label-large-size: 14px;
    --md-sys-typescale-label-medium-size: 12px;
    --md-sys-typescale-label-small-size: 11px;

    /* Shape */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 50%;
}

/* Android Professional Typography */
body {
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.009em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Material 3 Typography Classes */
.md-display-large {
    font-size: var(--md-sys-typescale-display-large-size);
    font-weight: 400;
    line-height: 64px;
}

.md-display-medium {
    font-size: var(--md-sys-typescale-display-medium-size);
    font-weight: 400;
    line-height: 52px;
}

.md-display-small {
    font-size: var(--md-sys-typescale-display-small-size);
    font-weight: 400;
    line-height: 44px;
}

.md-headline-large {
    font-size: var(--md-sys-typescale-headline-large-size);
    font-weight: 400;
    line-height: 40px;
}

.md-headline-medium {
    font-size: var(--md-sys-typescale-headline-medium-size);
    font-weight: 400;
    line-height: 36px;
}

.md-headline-small {
    font-size: var(--md-sys-typescale-headline-small-size);
    font-weight: 400;
    line-height: 32px;
}

.md-title-large {
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 400;
    line-height: 28px;
}

.md-title-medium {
    font-size: var(--md-sys-typescale-title-medium-size);
    font-weight: 500;
    line-height: 24px;
}

.md-title-small {
    font-size: var(--md-sys-typescale-title-small-size);
    font-weight: 500;
    line-height: 20px;
}

.md-body-large {
    font-size: var(--md-sys-typescale-body-large-size);
    font-weight: 400;
    line-height: 24px;
}

.md-body-medium {
    font-size: var(--md-sys-typescale-body-medium-size);
    font-weight: 400;
    line-height: 20px;
}

.md-body-small {
    font-size: var(--md-sys-typescale-body-small-size);
    font-weight: 400;
    line-height: 16px;
}

.md-label-large {
    font-size: var(--md-sys-typescale-label-large-size);
    font-weight: 500;
    line-height: 20px;
}

.md-label-medium {
    font-size: var(--md-sys-typescale-label-medium-size);
    font-weight: 500;
    line-height: 16px;
}

.md-label-small {
    font-size: var(--md-sys-typescale-label-small-size);
    font-weight: 500;
    line-height: 16px;
}

/* Android Material 3 Buttons - Professional */
.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.md-btn:focus {
    outline: none;
}

.md-btn-filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-sys-elevation-level0);
}

.md-btn-filled:hover {
    box-shadow: var(--md-sys-elevation-level1);
    filter: brightness(1.08);
}

.md-btn-filled:active {
    box-shadow: var(--md-sys-elevation-level0);
}

.md-btn-outlined {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.md-btn-outlined:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

.md-btn-text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    padding: 0 12px;
}

.md-btn-text:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

.md-btn-fab {
    width: 56px;
    height: 56px;
    border-radius: var(--md-sys-shape-corner-large);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    box-shadow: var(--md-sys-elevation-level3);
    padding: 0;
}

.md-btn-fab:hover {
    box-shadow: var(--md-sys-elevation-level4);
}

/* Android Material 3 State Layers and Ripple Effects */
.md-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.md-btn:hover::before {
    opacity: 0.08;
}

.md-btn:focus::before {
    opacity: 0.12;
}

.md-btn:active::before {
    opacity: 0.16;
}

.md-btn:active {
    transform: scale(0.96);
}

/* Android Material 3 Cards - Professional */
.md-card {
    background-color: var(--md-sys-color-surface-container-lowest);
    border-radius: 16px;
    box-shadow: var(--md-sys-elevation-level1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid var(--md-sys-color-outline-variant);
    position: relative;
    overflow: hidden;
}

.md-card:hover {
    box-shadow: var(--md-sys-elevation-level3);
    transform: translateY(-2px);
}

.md-card-filled {
    background-color: var(--md-sys-color-surface-container-highest);
}

.md-card-elevated {
    background-color: var(--md-sys-color-surface-container-low);
    box-shadow: var(--md-sys-elevation-level1);
}

.md-card-outlined {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: none;
}

/* Android Material 3 Navigation - Professional */
.md-nav-bar {
    background-color: var(--md-sys-color-surface-container-lowest);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: var(--md-sys-elevation-level2);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.md-nav-brand {
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    margin-right: auto;
}

.md-nav-item {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: var(--md-sys-typescale-title-small-size);
    font-weight: 500;
    margin: 0 4px;
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
}

.md-nav-item:hover {
    background-color: rgba(29, 27, 32, 0.08);
    color: var(--md-sys-color-on-surface);
}

.md-nav-item.active {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

/* Android Material 3 Forms - Professional */
.md-form-field {
    position: relative;
    margin: 20px 0;
}

.md-text-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 12px;
    background-color: var(--md-sys-color-surface-container-lowest);
    font-size: 16px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: var(--md-sys-elevation-level1);
}

.md-text-field:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 3px;
    padding: 15px 19px;
    box-shadow: var(--md-sys-elevation-level2);
    background-color: var(--md-sys-color-surface);
}

.md-text-field:hover {
    border-color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-surface);
}

.md-label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--md-sys-color-on-surface);
}

/* Android Material 3 Chips - Professional */
.md-chip {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background-color: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid var(--md-sys-color-outline-variant);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: var(--md-sys-elevation-level1);
}

.md-chip:hover {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    transform: translateY(-1px);
    box-shadow: var(--md-sys-elevation-level2);
}

.md-chip-elevated {
    background-color: var(--md-sys-color-surface-container-low);
    box-shadow: var(--md-sys-elevation-level1);
    border: none;
}

/* Material 3 Lists */
.md-list {
    background-color: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
}

.md-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 56px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
}

.md-list-item:hover {
    background-color: rgba(29, 27, 32, 0.08);
}

.md-list-item:last-child {
    border-bottom: none;
}

.md-list-item-content {
    flex: 1;
}

.md-list-item-title {
    font-size: var(--md-sys-typescale-body-large-size);
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.md-list-item-subtitle {
    font-size: var(--md-sys-typescale-body-medium-size);
    color: var(--md-sys-color-on-surface-variant);
}

/* Material 3 Data Tables */
.md-table {
    width: 100%;
    background-color: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-level1);
}

.md-table-header {
    background-color: var(--md-sys-color-surface-container);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.md-table-header th {
    padding: 16px;
    text-align: left;
    font-size: var(--md-sys-typescale-title-small-size);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.md-table-body tr {
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
}

.md-table-body tr:hover {
    background-color: rgba(29, 27, 32, 0.08);
}

.md-table-body tr:last-child {
    border-bottom: none;
}

.md-table-body td {
    padding: 16px;
    font-size: var(--md-sys-typescale-body-medium-size);
    color: var(--md-sys-color-on-surface);
}

/* Material 3 Badges */
.md-badge {
    display: inline-flex;
    align-items: center;
    height: 16px;
    padding: 0 6px;
    border-radius: var(--md-sys-shape-corner-full);
    background-color: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
    font-size: var(--md-sys-typescale-label-small-size);
    font-weight: 500;
}

.md-badge-secondary {
    background-color: var(--md-sys-color-secondary);
    color: var(--md-sys-color-on-secondary);
}

.md-badge-tertiary {
    background-color: var(--md-sys-color-tertiary);
    color: var(--md-sys-color-on-tertiary);
}

/* Android Material 3 Top App Bar - Professional */
.md-top-app-bar {
    background-color: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: var(--md-sys-elevation-level2);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.md-top-app-bar-title {
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: 400;
    margin-left: 16px;
    flex: 1;
}

/* Material 3 Icons */
.material-icons,
.material-symbols-outlined {
    font-size: 24px;
    vertical-align: middle;
}

/* Material 3 Floating Action Button */
.md-fab {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: var(--md-sys-shape-corner-large);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border: none;
    box-shadow: var(--md-sys-elevation-level3);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-fab:hover {
    box-shadow: var(--md-sys-elevation-level4);
}

/* Material 3 Dividers */
.md-divider {
    height: 1px;
    background-color: var(--md-sys-color-outline-variant);
    border: none;
    margin: 16px 0;
}

/* Material 3 Progress Indicators */
.md-progress-linear {
    height: 4px;
    background-color: var(--md-sys-color-surface-container-highest);
    border-radius: 2px;
    overflow: hidden;
}

.md-progress-linear-bar {
    height: 100%;
    background-color: var(--md-sys-color-primary);
    transition: width 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
}

/* Material 3 Footer Styles */
.footer-link {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-size: var(--md-sys-typescale-body-medium-size);
    font-weight: 400;
    transition: color 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
    display: block;
}

.footer-link:hover {
    color: var(--md-sys-color-primary);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    background-color: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0.0, 1.0);
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-level2);
}

.social-link .material-symbols-outlined {
    font-size: 20px;
}

/* Android Material 3 Professional Enhancements */
.md-surface-tint::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--md-sys-color-primary), transparent);
    opacity: 0.05;
    pointer-events: none;
    border-radius: inherit;
}

/* Professional Android Content Spacing */
.md-content-spacing {
    padding: var(--md-sys-spacing-lg);
}

.md-content-spacing-sm {
    padding: var(--md-sys-spacing-md);
}

.md-content-spacing-lg {
    padding: var(--md-sys-spacing-xl);
}

/* Material 3 Motion Presets */
.md-motion-easing-standard {
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.md-motion-easing-decelerate {
    transition: all 0.25s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.md-motion-easing-accelerate {
    transition: all 0.25s cubic-bezier(0.4, 0.0, 1, 1);
}

/* Professional Android Dropdown Menu Styling */
.dropdown-menu {
    border: 1px solid var(--md-sys-color-outline-variant) !important;
    border-radius: var(--md-sys-spacing-md) !important;
    box-shadow: var(--md-sys-elevation-level3) !important;
    background-color: var(--md-sys-color-surface-container-low) !important;
    padding: var(--md-sys-spacing-sm) !important;
    margin-top: var(--md-sys-spacing-sm) !important;
}

.dropdown-item {
    border-radius: var(--md-sys-spacing-sm) !important;
    margin: 2px !important;
    padding: var(--md-sys-spacing-sm) var(--md-sys-spacing-md) !important;
    color: var(--md-sys-color-on-surface) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}

.dropdown-item:hover {
    background-color: var(--md-sys-color-secondary-container) !important;
    color: var(--md-sys-color-on-secondary-container) !important;
}

.dropdown-item:active {
    background-color: var(--md-sys-color-primary-container) !important;
    color: var(--md-sys-color-on-primary-container) !important;
}

.dropdown-divider {
    border-color: var(--md-sys-color-outline-variant) !important;
    margin: var(--md-sys-spacing-sm) 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .md-nav-bar {
        padding: 0 8px;
    }
    
    .md-btn {
        min-width: 48px;
        height: 36px;
        padding: 0 16px;
    }
    
    .md-fab {
        bottom: 16px;
        right: 16px;
    }
    
    .md-display-large {
        font-size: 36px;
        line-height: 44px;
    }
    
    .md-display-medium {
        font-size: 28px;
        line-height: 36px;
    }
    
    .social-links {
        text-align: center;
    }
    
    footer .row > div {
        text-align: center;
    }
    
    footer .row > div:first-child {
        margin-bottom: 2rem;
    }
}