/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Better text rendering on all devices */
body,
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Prevent layout shift from scrollbar */
html {
    overflow-y: scroll;
}

:root {
    --primary-color: #3949ab;
    --secondary-color: #764ba2;
    --success-color: #51cf66;
    --danger-color: #ff6b6b;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: white;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e9ecef;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.3);
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #7c90f5;
    --secondary-color: #9066c0;
    --success-color: #69db7c;
    --danger-color: #ff8787;
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --card-bg: #2d3748;
    --text-color: #e2e8f0;
    --text-light: #a0aec0;
    --border-color: #4a5568;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.5);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.6);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.7);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-color);
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   UNIFIED BUTTON STYLES
   Used across all pages for consistency
   ============================================ */

/* Dark Mode Toggle - Standardized */
.dark-mode-toggle {
    position: fixed;
    bottom: 5.5rem; /* Position above scroll-to-top button */
    right: 2rem;
    z-index: 1100;
    background: var(--card-bg);
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    backdrop-filter: blur(10px);
    max-width: 200px;
    width: auto;
    height: auto;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hide text on mobile, show only icon */
.dark-mode-toggle #darkModeIcon {
    font-size: 1.2rem;
}

.dark-mode-toggle #darkModeText {
    white-space: nowrap;
}

/* Scroll to Top Button - Standardized */
.scroll-to-top,
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1100;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.scroll-to-top:hover,
.back-to-top:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.scroll-to-top.show,
.back-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back Button (floating) - Standardized */
.back-button-floating {
    position: fixed;
    top: 1rem;
    left: 2rem;
    z-index: 1100;
    background: var(--card-bg);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.back-button-floating:hover {
    transform: translateY(-2px) translateX(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: rgba(255, 255, 255, 1);
    color: var(--primary-color);
}

body.dark-mode .back-button-floating {
    border-color: rgba(124, 144, 245, 0.3);
}back-button-floating:hover {
    transform: translateY(-2px) translateX(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Button Styles */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Back link (for cases-dashboard) */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Card Styles */
.resources-section,
.tasks-section,
.ethernet-designs-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.6s ease-out;
}

.section-title {
    font-size: 1.8rem;
    color: #38006b !important;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #38006b !important;
    font-weight: 600;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

body.dark-mode .resource-card {
    background: linear-gradient(135deg, #3a4556 0%, #4a5568 100%);
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.resource-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.resource-link {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
    hyphens: auto;
}

.resource-link:hover {
    text-decoration: underline;
}

/* Search Box */
.search-box {
    background: var(--card-bg);
    border-radius: 50px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 0.5rem;
    background: transparent;
    color: var(--text-color);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* Filter Controls for AR List */
.filter-controls {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Stats Bar */
.stats-bar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* AR Grid */
.ar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ar-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border-left: 5px solid var(--primary-color);
    position: relative;
}

.ar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.ar-card.hidden {
    display: none;
}

.ar-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.ar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.ar-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ar-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Playbook Styles */
.playbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.playbook-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.playbook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.card-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Task Styles */
.task-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1.5rem;
    align-items: start;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 5px solid var(--text-light);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transition: width 0.3s ease;
    z-index: 0;
}

.task-item:hover::before {
    width: 100%;
}

.task-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.task-item.completed {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.05) 0%, rgba(64, 192, 87, 0.05) 100%);
}

.task-item.completed::before {
    width: 100%;
    background: linear-gradient(90deg, rgba(81, 207, 102, 0.08) 0%, rgba(64, 192, 87, 0.08) 100%);
}

.task-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.task-item:hover .task-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.task-item.completed .task-number {
    background: linear-gradient(135deg, var(--success-color) 0%, #40c057 100%);
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.4);
}

.task-item.completed:hover .task-number {
    box-shadow: 0 6px 20px rgba(81, 207, 102, 0.5);
}

.task-content {
    flex: 1;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.done-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success-color) 0%, #40c057 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 1rem;
    box-shadow: 0 2px 10px rgba(81, 207, 102, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    color: #856404;
    font-size: 0.95rem;
}

body.dark-mode .note {
    background: #4a4227;
    color: #ffd699;
    border-left-color: #ffb84d;
}

/* Progress Bar */
.progress-bar {
    background: var(--border-color);
    border-radius: 50px;
    height: 30px;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--success-color) 0%, #40c057 100%);
    height: 100%;
    border-radius: 50px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    color: white;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nav spacer - desktop default */
.nav-spacer {
    padding-top: 70px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Fix chart containers for mobile */
    .chart-container {
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        justify-content: space-evenly !important;
    }

    .chart-container > div {
        flex: 1 !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /* Fix CR/AR chart spacing */
    .cr-ar-chart {
        gap: 0.8rem !important;
        padding: 0 0.5rem !important;
        justify-content: space-evenly !important;
    }

    .cr-ar-chart > div {
        flex: 1 !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /* Fix bar labels to wrap properly */
    .chart-container > div > div:last-child > div,
    .cr-ar-chart > div > div:last-child > div {
        font-size: 0.75rem !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.2 !important;
        max-width: 100% !important;
    }
    
    /* Fix info-banner section for mobile */
    .info-banner {
        padding: 1.5rem !important;
    }

    .info-title {
        font-size: 1.5rem !important;
    }

    .info-banner > div > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .info-banner > div > div:first-child > div:first-child {
        font-size: 2rem !important;
    }

    .info-content-box {
        padding: 1rem !important;
    }

    .info-content-box p {
        font-size: 0.95rem !important;
    }

    .info-card {
        padding: 1rem !important;
    }

    .info-card h3 {
        font-size: 1rem !important;
    }

    .info-card p {
        font-size: 0.85rem !important;
    }
    
    /* Fix resource cards for mobile */
    .resource-grid {
        grid-template-columns: 1fr !important;
    }

    .resource-card {
        padding: 1.25rem !important;
        overflow: visible !important;
    }

    .resource-title {
        font-size: 1.1rem !important;
        margin-top: 1.5rem !important;
    }

    .resource-card div:last-child {
        font-size: 0.8rem !important;
    }
    
    /* Fix transition tasks inner cards for mobile */
    .task-item {
        padding: 1.5rem !important;
        flex-direction: column !important;
    }

    .task-item > div:first-of-type {
        flex-direction: column !important;
        width: 100% !important;
    }

    .task-number {
        margin-bottom: 0.5rem !important;
    }

    .task-item ul {
        margin-left: 1rem !important;
        font-size: 0.85rem !important;
    }

    .task-item ul li {
        margin-bottom: 0.3rem !important;
        line-height: 1.4 !important;
    }

    /* Fix inner cards in transition tasks */
    .task-item > div > div > div > div[style*="background: linear-gradient"] {
        max-width: 100% !important;
        display: block !important;
        margin-bottom: 1rem !important;
    }

    /* Fix button wrapping in transition tasks */
    .task-item div[style*="display: flex; flex-wrap: wrap"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .task-item div[style*="display: flex; flex-wrap: wrap"] a {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Remove header margin on mobile */
    .header {
        margin-top: 0 !important;
    }
    
    /* Reduce nav spacer on mobile - minimal space */
    .nav-spacer {
        padding-top: 0px !important;
    }
    
    /* Reduce container padding and pull up content */
    .container {
        padding-top: 0 !important;
        margin-top: -15px !important;
    }
    
    /* Also reduce header padding */
    .header h1 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Unified tablet/mobile button adjustments */
    .dark-mode-toggle {
        top: auto;
        bottom: 5.5rem; /* Move down to avoid overlapping content */
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        max-width: 150px;
        width: auto !important;
        height: auto !important;
    }

    /* Hide text on mobile, show icon only */
    .dark-mode-toggle #darkModeText {
        display: none;
    }

    .dark-mode-toggle #darkModeIcon {
        font-size: 1.3rem;
        margin: 0;
    }

    .back-button-floating {
        left: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .scroll-to-top,
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem; /* Move to bottom to avoid dark mode button */
        right: 1rem;
        font-size: 1.2rem;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .ar-grid {
        grid-template-columns: 1fr;
    }

    .playbook-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: center;
    }

    .stats-bar {
        flex-direction: column;
        text-align: center;
    }

    .task-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .task-number {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    /* Unified mobile button adjustments */
    .dark-mode-toggle {
        top: auto;
        bottom: 5.5rem; /* Move down to avoid overlapping content */
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        max-width: 60px;
        width: auto !important;
        height: auto !important;
    }

    /* Hide text, show only icons on mobile */
    .dark-mode-toggle #darkModeText {
        display: none;
    }

    .dark-mode-toggle #darkModeIcon {
        font-size: 1.3rem;
        margin: 0;
    }

    .back-button-floating {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .scroll-to-top,
    .back-to-top {
        bottom: 1rem; /* Move to bottom to avoid dark mode button */
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .playbook-card {
        padding: 1.5rem;
    }
}

/* Ethernet Reference Designs Section */
.ethernet-designs-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.design-category {
    margin: 2rem 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--text-color);
}

.category-icon {
    font-size: 2rem;
}

.design-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.design-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.design-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 153, 255, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.15);
}

.design-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.design-info {
    flex: 1;
}

.design-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--primary-color);
}

.design-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.design-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.design-item:hover .design-arrow {
    transform: translateX(5px);
}

/* Presentation Section */
.pdf-container {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-container iframe {
    display: block;
}

.download-button {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.3);
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.4);
}

@media (max-width: 768px) {
    .ethernet-designs-section .section-title {
        font-size: 2rem;
    }

    .category-header {
        font-size: 1.5rem;
    }

    .design-item {
        padding: 1rem;
    }

    .design-icon {
        font-size: 1.5rem;
    }

    .design-name {
        font-size: 0.95rem;
    }

    .design-desc {
        font-size: 0.8rem;
    }
}

/* Footer Styles */
.page-footer {
    background: transparent;
    padding: 2rem;
    margin-top: 0;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.last-updated {
    color: #666666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.powered-by {
    color: #000000;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

#powered-text {
    font-weight: 800;
    color: #000000;
}

body.dark-mode .last-updated {
    color: #a0aec0;
}

body.dark-mode .powered-by {
    color: #e2e8f0;
}

body.dark-mode #powered-text {
    color: #e2e8f0 !important;
}

.powered-by::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-right: 1rem;
    vertical-align: middle;
}

.powered-by::after {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-left: 1rem;
    vertical-align: middle;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Styles for External CSS */
@media (max-width: 768px) {
    /* Body adjustments */
    body {
        padding: 1rem;
        font-size: 16px;
    }

    /* Container */
    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Header */
    header {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }

    /* Dark mode toggle */
    .dark-mode-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Section title */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Cards and sections */
    .resources-section,
    .tasks-section,
    .ethernet-designs-section {
        padding: 1.5rem;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }

    /* Resource grid */
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Resource card */
    .resource-card {
        padding: 1.2rem;
        border-radius: 10px;
    }

    .resource-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .resource-link {
        font-size: 0.9rem;
        word-break: break-word;
    }

    /* Search box */
    .search-box {
        padding: 0.8rem 1.5rem;
        border-radius: 25px;
    }

    .search-input {
        font-size: 1rem;
    }

    /* Back button */
    .back-button,
    .back-link {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.9rem;
        border-radius: 25px;
        gap: 0 !important;
    }
    
    /* Hide back button text on mobile */
    .back-button > span:nth-child(2),
    .back-link > span:nth-child(2) {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* Keep arrow visible and centered */
    .back-button > span:first-child,
    .back-link > span:first-child {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }

    /* AR cards */
    .ar-card {
        padding: 1.2rem;
        border-radius: 10px;
    }

    .ar-card h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .ar-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* AR metadata */
    .ar-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    /* Playbook sections */
    .playbook-section {
        padding: 1.2rem;
        border-radius: 10px;
    }

    .playbook-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .playbook-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .playbook-section p,
    .playbook-section li {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Code blocks */
    pre {
        font-size: 0.85rem;
        padding: 0.8rem;
        border-radius: 8px;
        overflow-x: auto;
    }

    code {
        font-size: 0.85rem;
    }

    /* Footer */
    .page-footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }

    .footer-content {
        font-size: 0.9rem;
    }

    .last-updated {
        font-size: 0.85rem;
    }

    .powered-by {
        font-size: 0.9rem;
    }

    .powered-by::before,
    .powered-by::after {
        width: 1.5rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
        font-size: 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .dark-mode-toggle {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
        min-height: 48px;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .resources-section,
    .tasks-section,
    .ethernet-designs-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .resource-card {
        padding: 1rem;
    }

    .resource-title {
        font-size: 1rem;
    }

    .resource-link {
        font-size: 0.85rem;
    }

    .search-box {
        padding: 0.7rem 1.2rem;
    }

    .ar-card {
        padding: 1rem;
    }

    .ar-card h3 {
        font-size: 1rem;
    }

    .ar-card p {
        font-size: 0.85rem;
    }

    .playbook-section {
        padding: 1rem;
    }

    .playbook-section h2 {
        font-size: 1.2rem;
    }

    .playbook-section h3 {
        font-size: 1rem;
    }

    .playbook-section p,
    .playbook-section li {
        font-size: 0.85rem;
    }

    pre {
        font-size: 0.8rem;
        padding: 0.7rem;
    }

    code {
        font-size: 0.8rem;
    }
}

/* Landscape orientation optimization */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 0.5rem 1rem;
    }

    header {
        margin-bottom: 1.5rem;
    }

    .resources-section,
    .tasks-section,
    .ethernet-designs-section {
        padding: 1rem 1.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for interactive elements, but not buttons that already have proper sizing */
    .back-button,
    .resource-link,
    a.card,
    a.resource-card {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .resource-card:hover,
    .ar-card:hover,
    .back-button:hover,
    .dark-mode-toggle:hover {
        transform: none;
    }

    /* Add active state for touch feedback */
    .resource-card:active,
    .ar-card:active,
    .back-button:active,
    .dark-mode-toggle:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}



/* ============================================
   ETHERNET INTERFACES PAGE SPECIFIC STYLES
   Added from ethernet-interfaces.css consolidation
   ============================================ */

/* Additional CSS Variables for Ethernet Page */
:root {
    --mio-path: #2e7d32;
    --emio-path: #7b1fa2;
    --gtr-path: #1565c0;
    --warning: #ffd43b;
    --info: #339af0;
}

/* Touch-friendly improvements - Extended */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-y: scroll;
}

body {
    overflow-x: hidden;
}

/* Prevent text selection on interactive elements */
.expand-header, .expand-icon, button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Extended container for ethernet page */
.container {
    max-width: 1600px;
}

/* Header Extensions for Ethernet Page */
.header {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
}

.header .subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.header .version-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Architecture Diagram Section */
.diagram-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.diagram-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mermaid {
    background: transparent;
    text-align: center;
    padding: 2rem 0;
}

/* Pathway Cards Section */
.pathway-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.pathway-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pathway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color) 0%, var(--card-color-light) 100%);
}

.pathway-card.mio-card {
    --card-color: var(--mio-path);
    --card-color-light: #69db7c;
}

.pathway-card.emio-card {
    --card-color: var(--emio-path);
    --card-color-light: #faa2c1;
}

.pathway-card.gtr-card {
    --card-color: var(--gtr-path);
    --card-color-light: #74c0fc;
}

.pathway-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pathway-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pathway-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--card-color) 0%, var(--card-color-light) 100%);
    color: white;
    font-size: 1.5rem;
}

.pathway-card .flow-diagram {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--card-color);
}

.flow-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.flow-node {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    border: 2px solid var(--card-color);
    color: var(--text-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .flow-node {
    background: #1a202c;
    color: var(--text-color);
}

.flow-arrow {
    color: var(--card-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.specs-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.specs-list li::before {
    content: '';
    color: var(--card-color);
    font-weight: bold;
    flex-shrink: 0;
}

.specs-list strong {
    color: var(--card-color);
}

.note strong,
.note .specs-list strong {
    color: #856404;
}

body.dark-mode .note strong,
body.dark-mode .note .specs-list strong {
    color: #ffd699;
}

/* Code Block Section */
.code-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.code-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-block {
    position: relative;
    margin: 1rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #1e1e1e;
    border-radius: 12px 12px 0 0;
    color: #d4d4d4;
}

.code-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success-color);
}

pre {
    margin: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

pre code {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Version Comparison Matrix */
.matrix-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.matrix-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.matrix-table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem auto 0 auto;
    overflow-x: auto;
    display: table;
}

.matrix-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.matrix-table th,
.matrix-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.matrix-table th {
    font-weight: 600;
    white-space: nowrap;
}

.matrix-table tbody tr {
    transition: all 0.3s ease;
}

.matrix-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Table wrapper for mobile scrolling */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-available {
    background: rgba(81, 207, 102, 0.2);
    color: var(--success-color);
}

.status-unavailable {
    background: rgba(255, 59, 59, 0.2);
    color: #ff3b3b;
}

.status-pending {
    background: rgba(255, 212, 59, 0.2);
    color: var(--warning);
}

/* Info Callouts */
.info-callout {
    background: linear-gradient(135deg, rgba(51, 154, 240, 0.95) 0%, rgba(51, 154, 240, 0.85) 100%);
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(51, 154, 240, 0.3);
}

body.dark-mode .info-callout {
    background: linear-gradient(135deg, rgba(51, 154, 240, 0.25) 0%, rgba(51, 154, 240, 0.15) 100%);
    border-left: 4px solid rgba(51, 154, 240, 0.6);
    box-shadow: 0 4px 15px rgba(51, 154, 240, 0.2);
}

.info-callout h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

body.dark-mode .info-callout h4 {
    color: #74c0fc;
}

.info-callout p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.6;
}

body.dark-mode .info-callout p {
    color: var(--text-color);
}

/* Expandable Section */
.expandable {
    margin: 1rem 0;
}

.expand-header {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.expand-header:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.expand-header h4 {
    margin: 0;
    color: var(--text-color);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.expandable.open .expand-icon {
    transform: rotate(180deg);
}

.expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.expandable.open .expand-content {
    max-height: 2000px;
}

.expand-content-inner {
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 12px;
    margin-top: 0.5rem;
}

body.dark-mode .expand-content-inner {
    background: rgba(102, 126, 234, 0.1);
}

/* Data Browser Section */
.data-browser-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem 0 2rem;
    box-shadow: var(--shadow-md);
    color: white;
}

body.dark-mode .data-browser-section {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.4) 0%, rgba(42, 82, 152, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-browser-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.data-browser-section > p {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1rem;
}

.filter-controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .filter-controls {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-item label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.3px;
}

.filter-item select,
.filter-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-item select:hover,
.filter-search input:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.filter-item select:focus,
.filter-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-mode .filter-item select,
body.dark-mode .filter-search input {
    background: #2d3748;
    color: #e2e8f0;
    border: 2px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .filter-item select:hover,
body.dark-mode .filter-search input:hover {
    border-color: rgba(124, 144, 245, 0.6);
    box-shadow: 0 4px 12px rgba(124, 144, 245, 0.3);
}

body.dark-mode .filter-item select:focus,
body.dark-mode .filter-search input:focus {
    border-color: #7c90f5;
    box-shadow: 0 0 0 3px rgba(124, 144, 245, 0.2);
}

.filter-search {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.filter-search input {
    flex: 1;
    padding: 0.85rem 1.25rem;
}

.filter-search button {
    padding: 0.85rem 2rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-search button:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.filter-search button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

body.dark-mode .filter-search button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

body.dark-mode .filter-search button:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.results-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    min-height: 200px;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .results-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.results-container p {
    text-align: center;
    opacity: 0.7;
    font-size: 1rem;
}

/* Design Group Cards */
.design-group {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

body.dark-mode .design-group {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.design-header {
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.design-header:hover {
    background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .design-header {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .design-header:hover {
    background: rgba(0, 0, 0, 0.4);
}

.design-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.design-name {
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 600;
}

body.dark-mode .design-name {
    color: #7c90f5;
}

.node-count {
    padding: 0.25rem 0.75rem;
    background: rgba(78, 205, 196, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #27ae60;
}

body.dark-mode .node-count {
    background: rgba(78, 205, 196, 0.3);
    color: #51cf66;
}

.group-toggle-icon {
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

body.dark-mode .group-toggle-icon {
    color: #7c90f5;
}

.design-content {
    padding: 1.5rem;
}

/* Ethernet Node Cards */
.ethernet-node-card {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
    overflow: hidden;
}

body.dark-mode .ethernet-node-card {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: #7c90f5;
}

.ethernet-node-header {
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ethernet-node-header:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .ethernet-node-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.node-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.node-info h4 {
    margin: 0;
    font-size: 1.1rem;
}

.node-type-badge {
    padding: 0.25rem 0.75rem;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.node-toggle-icon {
    color: #667eea;
    font-size: 1.1rem;
    margin-left: auto;
}

body.dark-mode .node-toggle-icon {
    color: #7c90f5;
}

.node-properties {
    padding: 0 1rem 1rem 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    font-size: 0.85rem;
}

.property-item {
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .property-item {
    color: #ccc;
}

.property-item strong {
    color: #333;
    margin-right: 0.5rem;
}

body.dark-mode .property-item strong {
    color: #fff;
}

/* Device Tree Section */
.device-tree-section {
    margin-top: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .device-tree-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h5 {
    margin: 0;
    color: #667eea;
    font-size: 1rem;
}

body.dark-mode .section-header h5 {
    color: #7c90f5;
}

.copy-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-button:hover {
    background: linear-gradient(135deg, #7c90f5, #9066c0);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.copy-button:active {
    transform: translateY(0);
}

.device-tree-section pre {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    margin: 0;
}

body.dark-mode .device-tree-section pre {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Make all pre blocks in expandable sections scrollable */
.expand-content-inner pre {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
}

/* For mobile, reduce max-height */
@media (max-width: 768px) {
    .expand-content-inner pre {
        max-height: 400px;
    }
}

.device-tree-section code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #f8f8f2;
}

/* Badges */
.version-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #51cf66, #37b24d);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.design-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Expand/Collapse All Buttons */
.expand-collapse-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.expand-collapse-btn:hover {
    background: linear-gradient(135deg, #7c90f5, #9066c0);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.expand-collapse-btn:active {
    transform: translateY(0);
}

body.dark-mode .expand-collapse-btn {
    background: linear-gradient(135deg, #7c90f5, #9066c0);
}

/* Mobile Adjustments for Ethernet Page */
@media (max-width: 768px) {
    /* Container mobile padding */
    .container {
        padding: 0 1rem;
    }

    /* CRITICAL: Override button sizes for ethernet page mobile */
    .dark-mode-toggle {
        top: auto !important;
        bottom: 5.5rem !important; /* Consistent with index.html mobile */
        right: 1rem !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
        max-width: 150px !important;
        width: auto !important;
        height: auto !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    .dark-mode-toggle #darkModeText {
        display: none !important;
    }

    .dark-mode-toggle #darkModeIcon {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }

    .back-button-floating {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        max-width: 200px !important;
        width: auto !important;
        height: auto !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    .scroll-to-top,
    .back-to-top {
        width: 45px !important;
        height: 45px !important;
        bottom: 1rem !important; /* Move down to avoid dark mode button */
        right: 1rem !important;
        font-size: 1.2rem !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    /* Header mobile adjustments */
    .header {
        margin-top: 5rem !important; /* Add extra space for back button */
        padding: 0 1rem;
    }

    .header h1 {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .header .subtitle {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    .header .version-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
        margin-top: 0.75rem;
    }

    .pathway-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .node-properties {
        grid-template-columns: 1fr;
        font-size: 0.85rem;
    }

    .property-item {
        white-space: normal;
        word-break: break-word;
    }

    /* Expandable sections */
    .expand-header h4 {
        font-size: 1rem;
    }

    .expand-content-inner {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .expand-content-inner pre {
        font-size: 0.75rem;
        overflow-x: auto;
        padding: 0.75rem !important;
    }

    .expand-content-inner ul {
        margin-left: 1rem !important;
        font-size: 0.85rem;
    }

    /* Code blocks */
    .code-block {
        overflow-x: auto;
        font-size: 0.75rem;
    }

    /* Category headings */
    h2 {
        font-size: 1.5rem !important;
        padding: 0 0.5rem;
    }

    h3 {
        font-size: 1.2rem !important;
        padding-left: 0.75rem !important;
    }

    /* Cards */
    .card,
    .code-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Diagram sections */
    .diagram-section,
    .mermaid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Section adjustments */
    section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Results header with buttons - fix overflow on mobile */
    .results-container > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .results-container > div:first-child > div {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .expand-collapse-btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.8rem !important;
        white-space: nowrap !important;
    }

    /* Comparison cards */
    .comparison-cards {
        grid-template-columns: 1fr;
    }

    /* Navigation */
    .nav-section {
        padding: 1rem;
    }

    .nav-section ul {
        padding-left: 1.5rem;
    }

    .matrix-table {
        font-size: 0.75rem;
        overflow-x: auto;
        display: block;
    }

    .matrix-table th,
    .matrix-table td {
        padding: 0.4rem;
        min-width: 80px;
    }
}

/* Tablet responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .pathway-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .matrix-table {
        font-size: 0.9rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    /* CRITICAL: Override button sizes for ethernet page small mobile */
    .dark-mode-toggle {
        top: auto !important;
        bottom: 5.5rem !important; /* Consistent with index.html mobile */
        right: 1rem !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        max-width: 60px !important;
        width: auto !important;
        height: auto !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    .dark-mode-toggle #darkModeText {
        display: none !important;
    }

    .dark-mode-toggle #darkModeIcon {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }

    .back-button-floating {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        max-width: 180px !important;
        width: auto !important;
        height: auto !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    .scroll-to-top,
    .back-to-top {
        width: 48px !important;
        height: 48px !important;
        bottom: 1rem !important; /* Move down to avoid dark mode button */
        right: 1rem !important;
        font-size: 1.3rem !important;
        min-width: unset !important;
        min-height: unset !important;
    }

    /* Header extra small mobile */
    .header {
        margin-top: 1.5rem !important;
        padding: 0 0.75rem;
    }

    .header h1 {
        font-size: 1.5rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .header .subtitle {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }

    .header .version-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.85rem;
        margin-top: 0.5rem;
    }

    .expand-header h4 {
        font-size: 0.9rem;
    }

    .expand-content-inner pre {
        font-size: 0.7rem;
    }

    /* Results header with buttons - fix overflow on small mobile */
    .results-container > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.8rem !important;
    }

    .results-container > div:first-child > div {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .expand-collapse-btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.7rem !important;
        white-space: nowrap !important;
    }
}


/* ============================================
   INDEX.HTML SPECIFIC STYLES
   Role Transition Tracker Page Styles
   ============================================ */

/* Info Banner Styles - Light Mode */
.info-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
}

.info-decoration {
    background: rgba(255,255,255,0.1);
}

.info-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.info-content-box {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Info Banner Styles - Dark Mode */
body.dark-mode .info-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: var(--text-color);
}

body.dark-mode .info-decoration {
    background: rgba(102, 126, 234, 0.15);
}

body.dark-mode .info-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

body.dark-mode .info-content-box {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

body.dark-mode .info-card {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.25);
}

/* Contribution Section Styles - Light Mode */
.contribution-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    color: white !important;
}

/* Contribution Section Styles - Dark Mode */
body.dark-mode .contribution-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 50%, rgba(240, 147, 251, 0.2) 100%) !important;
    color: var(--text-color) !important;
    border: 2px solid rgba(102, 126, 234, 0.4);
}

body.dark-mode .contribution-section .chart-container > div > div:first-child {
    color: var(--text-color) !important;
}

body.dark-mode .contribution-section h2,
body.dark-mode .contribution-section h3,
body.dark-mode .contribution-section p {
    color: var(--text-color) !important;
}

body.dark-mode .contribution-section a {
    background: rgba(102, 126, 234, 0.9) !important;
    color: white !important;
    border: 2px solid rgba(102, 126, 234, 0.5) !important;
}

body.dark-mode .contribution-section a:hover {
    background: rgba(102, 126, 234, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

/* Hover effect for contribution buttons */
.contribution-section a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Section styles for index page */
.section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}


/* ============================================
   INDEX.HTML BODY OVERRIDES
   Different layout from other pages due to fixed nav
   ============================================ */

/* Index page needs different body styling due to fixed nav */
body:has(nav[style*="position: fixed"]) {
    padding: 80px 2rem 2rem 2rem;
}

/* Mobile body padding override for index */
@media (max-width: 768px) {
    body:has(nav[style*="position: fixed"]) {
        padding-top: 140px;
    }
}

/* ============================================
   INDEX.HTML NAVIGATION & MOBILE MENU STYLES
   ============================================ */

/* iOS adjustments */
body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* Navigation link styles with animated underline */
.nav-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active nav link state */
.nav-link.active {
    color: #667eea !important;
}

.nav-link.active::after {
    width: 100%;
}

/* Logo animation and decorative dot */
#navbar-brand {
    transition: transform 0.3s ease;
    position: relative;
    display: inline-block;
}

/* Logo rotation on hover - target the inner span */
#navbar-brand:hover span:first-child {
    transform: rotate(360deg) scale(1.1);
}

#navbar-brand span:first-child {
    transition: transform 0.6s ease;
    position: relative;
    z-index: 1;
}

/* Decorative circle behind logo */
#navbar-brand::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    width: 40px;
    height: 40px;
    background: #3e64ff;
    z-index: -1;
    transform: translateY(-50%);
    border-radius: 50%;
}

/* Dark mode nav styles */
body.dark-mode nav {
    background: rgba(30, 30, 30, 0.95) !important;
}

body.dark-mode #navbar-brand span:last-child {
    color: #fff !important;
}

body.dark-mode .nav-link {
    color: #ddd !important;
}

body.dark-mode .nav-link:hover {
    color: #667eea !important;
}

body.dark-mode .nav-link.active {
    color: #667eea !important;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

body.dark-mode .mobile-menu-toggle {
    color: #fff;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.desktop-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 10px 10px;
        animation: slideDown 0.3s ease;
    }
    
    .desktop-menu.show,
    .desktop-menu.mobile-menu-open {
        display: flex;
    }
    
    body.dark-mode .desktop-menu {
        background: rgba(40, 40, 40, 0.98);
    }
    
    .nav-link::after {
        display: none;
    }

    /* Hide back button text on mobile, show only arrow */
    nav a[href="index.html"]:not(#navbar-brand) span:last-child {
        display: none;
    }
    
    nav a[href="index.html"]:not(#navbar-brand) {
        padding: 0.5rem !important;
        min-width: 40px;
    }
    
    /* Hide text on all back buttons (both fixed and regular) on mobile */
    a[href="index.html"].back-button > span:nth-child(2),
    a[href="index.html"][style*="position: fixed"] > span:nth-child(2) {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* Keep arrow visible and centered on all back buttons */
    a[href="index.html"].back-button > span:first-child,
    a[href="index.html"][style*="position: fixed"] > span:first-child {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }
    
    /* Adjust back button styling for mobile */
    a[href="index.html"].back-button {
        padding: 0.5rem 0.8rem !important;
        min-width: auto !important;
        gap: 0 !important;
    }
    
    /* Adjust Back to Tracker button positioning on mobile (ethernet page specific) */
    a[href="index.html"][style*="position: fixed"][style*="top: 110px"] {
        left: 1rem !important;
        top: 95px !important;
        padding: 0.5rem 0.8rem !important;
        gap: 0 !important;
    }

    a[href="index.html"][style*="position: fixed"] span:last-child {
        display: none;
    }

}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   INDEX.HTML INFO BANNER & DECORATIONS
   ============================================ */

.info-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.info-title {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.info-content-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

body.dark-mode .info-card {
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   INDEX.HTML TASK ITEMS & BADGES
   ============================================ */

.task-item {
    background: var(--card-bg);
    border: 3px solid rgba(102, 126, 234, 0.4);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
}

.task-item.completed {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.1) 0%, rgba(64, 192, 87, 0.1) 100%);
    border-color: #51cf66;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.2);
}

body.dark-mode .task-item {
    background: var(--card-bg);
    border-color: rgba(102, 126, 234, 0.5);
}

body.dark-mode .task-item.completed {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.15) 0%, rgba(64, 192, 87, 0.15) 100%);
    border-color: #51cf66;
}

.task-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.task-item.completed .task-number {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    animation: popIn 0.5s ease;
}

.done-badge {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(81, 207, 102, 0.3);
    animation: popIn 0.5s ease;
}

/* ============================================
   INDEX.HTML RESOURCE & DESIGN CARDS
   ============================================ */

.resource-card {
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

.resource-card a:hover {
    transform: translateX(5px);
}

/* Dark mode resource card title colors */
body.dark-mode .resource-title {
    color: #e0e0e0 !important;
}

/* Override specific colors for better dark mode visibility */
body.dark-mode .resource-card [style*="color: #1565c0"] {
    color: #64b5f6 !important;
}

body.dark-mode .resource-card [style*="color: #6a1b9a"] {
    color: #ba68c8 !important;
}

body.dark-mode .resource-card [style*="color: #c62828"] {
    color: #ef5350 !important;
}

body.dark-mode .resource-card [style*="color: #4a148c"] {
    color: #ce93d8 !important;
}

body.dark-mode .resource-card [style*="color: #f57c00"] {
    color: #ffb74d !important;
}

body.dark-mode .resource-card [style*="color: #2e7d32"] {
    color: #81c784 !important;
}

body.dark-mode .resource-card [style*="color: #006064"] {
    color: #4dd0e1 !important;
}

/* Dark mode description text */
body.dark-mode .resource-card [style*="color: #888"] {
    color: #aaa !important;
}

/* Fix color contrast for resource card descriptions */
.resource-card [style*="color: #666"] {
    color: #555 !important;
}

body.dark-mode .resource-card [style*="color: #666"] {
    color: #bbb !important;
}

/* Fix color contrast for resource card description text in dark mode */
body.dark-mode .resource-card [style*="color: #333333"] {
    color: #e0e0e0 !important;
}

/* Style for resource card description text */
.resource-card div[style*="margin-top: 0.8rem"][style*="font-size: 0.85rem"] {
    color: #333333;
}

body.dark-mode .resource-card div[style*="margin-top: 0.8rem"][style*="font-size: 0.85rem"] {
    color: #e0e0e0 !important;
}

/* Fix color contrast for all card description text */
.resource-card div[style*="font-size: 0.85rem"][style*="color: #666"] {
    color: #4a4a4a !important;
}

body.dark-mode .resource-card div[style*="font-size: 0.85rem"][style*="color: #666"] {
    color: #c5c5c5 !important;
}

/* Fix color contrast for resource titles with light colors */
.resource-title[style*="color: #2e7d32"] {
    color: #1b5e20 !important;
}

.resource-title[style*="color: #e65100"] {
    color: #bf360c !important;
}

.resource-title[style*="color: #1565c0"] {
    color: #0d47a1 !important;
}

/* Fix contact section subtitle contrast */
.contact-section > div:nth-child(1) > p[style*="opacity: 0.8"] {
    color: #4a4a4a !important;
    opacity: 1 !important;
}

body.dark-mode .contact-section > div:nth-child(1) > p[style*="opacity: 0.8"] {
    color: #d0d0d0 !important;
    opacity: 1 !important;
}

/* Design category headers */
.category-header {
    transition: all 0.3s ease;
}

/* Fix color contrast for category header badges */
.category-header [style*="color: white"][style*="background: #667eea"] {
    background: #4a5ab8 !important;
}

.category-header [style*="color: white"][style*="background: #f5576c"] {
    background: #d43549 !important;
}

/* Fix category header text contrast */
.category-header span[style*="color: #667eea"] {
    color: #4a5ab8 !important;
}

.category-header span[style*="color: #f5576c"] {
    color: #d43549 !important;
}

.category-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Design list items */
.design-item {
    transition: all 0.3s ease;
}

.design-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
    border-color: currentColor !important;
}

.design-item:hover .design-arrow {
    transform: translateX(5px);
}

/* ============================================
   INDEX.HTML ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes popOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}
/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */

/* Fix 1: Key Meetings Section - Inner Cards */
@media (max-width: 768px) {
    .meetings-section .meeting-card {
        padding: 1.2rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .meetings-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Fix 2: Contributed CRs, ARs & CQs - Stack Bars Vertically */
@media (max-width: 768px) {
    .cr-ar-chart {
        flex-direction: column !important;
        height: auto !important;
        align-items: stretch !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
    }
    
    .cr-ar-chart > div {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .cr-ar-chart > div > div[style*="height"] {
        width: 80% !important;
        margin: 0 auto !important;
        max-height: 150px !important;
    }
    
    .cr-ar-chart > div > div > div[style*="position: absolute"] {
        position: static !important;
        transform: none !important;
        margin-top: 0.5rem !important;
        white-space: normal !important;
        text-align: center !important;
    }
}

/* Fix 3: Transition Tasks - Symmetric Padding for Inner Cards */
@media (max-width: 768px) {
    .task-item {
        padding: 1.2rem 1rem !important;
    }
    
    .task-item .task-number {
        min-width: 40px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    /* Task content wrapper */
    .task-item .task-content,
    .task-item > div[style*="flex: 1"] {
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* Inner light background cards - override inline styles */
    .task-item .task-content > div[style*="background"][style*="padding"][style*="border-radius"],
    .task-item > div[style*="flex: 1"] > div[style*="background"][style*="padding"][style*="border-radius"] {
        max-width: 100% !important;
        display: block !important;
        width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }
    
    /* Button wrapper */
    .task-item div[style*="margin-top"][style*="display: flex"] {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .task-item a[style*="display: inline-block"] {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
}