/* LoL Matchups Editor - Core Styles
   Extracted from matchups_editor.html inline <style> tag
   Contains all base styles, layout, components, and editor-specific styles
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e4e4e4;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

header {
    margin-bottom: 30px;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    border: 1px solid rgba(243, 156, 18, 0.2);
    display: flex;
    align-items: center;
    gap: 30px;
}

h1 {
    font-size: 2em;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(243, 156, 18, 0.6));
    position: relative;
    padding-bottom: 8px;
    white-space: nowrap;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #f39c12, #e67e22, transparent);
    border-radius: 2px;
}

/* Logo and Title Group */
.header-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(243, 156, 18, 0.4));
    transition: all 0.3s ease;
}

.header-logo:hover {
    filter: drop-shadow(0 0 16px rgba(243, 156, 18, 0.7));
    transform: scale(1.05);
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header Home Link - Makes logo + title clickable */
.header-home-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.header-home-link:hover .header-title-group {
    opacity: 0.9;
}

.header-home-link:focus {
    outline: 2px solid rgba(243, 156, 18, 0.5);
    outline-offset: 4px;
    border-radius: 8px;
}

/* Navigation Links - Integrated into Header */
.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.nav-link {
    padding: 10px 24px;
    background: transparent;
    color: #d4d4d4;
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(243, 156, 18, 0.15);
    border-color: #f39c12;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
    color: #f39c12;
}

.nav-link.active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #0a0a0f;
    border-color: #f39c12;
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.6);
    cursor: default;
}

.nav-link.active:hover {
    transform: none;
}

/* Authentication Section */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.login-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-google, .btn-twitch {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-google {
    background: white;
    color: #333;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.btn-twitch {
    background: #9146FF;
    color: white;
}

.btn-twitch:hover {
    background: #7d3be0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(145, 70, 255, 0.4);
}

/* User Profile Dropdown Container */
.user-profile-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Dropdown Trigger */
.user-profile-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(243, 156, 18, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

#userName {
    color: #f39c12;
    font-weight: 500;
    font-size: 0.95em;
}

.dropdown-caret {
    margin-left: auto;
    color: #bdc3c7;
    transition: transform 0.3s;
}

.user-profile-trigger:hover .dropdown-caret {
    color: #f39c12;
}

/* Dropdown Menu */
.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: rgba(15, 20, 25, 0.98);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(243, 156, 18, 0.15);
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Dropdown Header (User Info) */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(243, 156, 18, 0.05);
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #f39c12;
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.4);
}

.dropdown-user-info {
    flex: 1;
    overflow: hidden;
}

.dropdown-name {
    color: #f39c12;
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-email {
    color: #95a5a6;
    font-size: 0.85em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: rgba(243, 156, 18, 0.2);
    margin: 0;
}

/* Dropdown Section */
.dropdown-section {
    padding: 8px 0;
}

/* Dropdown Items (Links) */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #e4e4e4;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Current Page Indicator */
.dropdown-item.current-page {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    font-weight: 500;
}

.current-indicator {
    margin-left: auto;
    color: #f39c12;
    font-weight: 600;
}

/* Dropdown Buttons */
.dropdown-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #e4e4e4;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1em;
    font-family: inherit;
}

.dropdown-item-btn:hover {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.dropdown-item-btn svg {
    flex-shrink: 0;
}

/* LoL Account Status in Dropdown */
.dropdown-lol-status {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #bdc3c7;
    font-size: 0.9em;
}

.lol-account-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #f39c12;
    flex-shrink: 0;
}

/* Twitch Connection Status in Dropdown */
.dropdown-twitch-status {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #bdc3c7;
    font-size: 0.9em;
}

.twitch-profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #9146FF;
    flex-shrink: 0;
}

.twitch-icon {
    flex-shrink: 0;
}

/* Logout Button Specific Styling */
.btn-logout-dropdown {
    color: #e74c3c;
}

.btn-logout-dropdown:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-title-group {
        flex-direction: column;
        gap: 10px;
    }

    .header-logo {
        height: 40px;
    }

    h1 {
        font-size: 1.6em;
    }

    h1::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .nav-link {
        width: 100%;
    }

    .auth-section {
        margin-left: 0;
        justify-content: center;
    }

    .user-profile-dropdown {
        right: 50%;
        transform: translateX(50%);
    }
}

/* Champion Selector */
.champion-selector {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* General hidden utility class */
.hidden {
    display: none !important;
}

.champion-selector.hidden {
    display: none;
}

.champion-selector h2 {
    color: #f39c12;
    margin-bottom: 15px;
}

.champion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 70vh; /* Use 70% of viewport height for less scrolling */
    overflow-y: auto;
    padding: 10px;
}

.champion-card {
    text-align: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.champion-card:hover {
    border-color: #f39c12;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.champion-card.selected {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
}

.champion-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.champion-card .name {
    font-size: 0.75em;
    color: #e4e4e4;
}

/* Phase 5.3: Placeholder for lazy-loaded champion images */
.champion-image-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #2a2a3a 0%, #1a1a2a 100%);
    animation: placeholder-pulse 1.5s ease-in-out infinite;
}

@keyframes placeholder-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

/* Current Perspective Display - Two Row Layout */
.current-perspective {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(20, 20, 30, 0.8) 100%);
    border: 2px solid #f39c12;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.current-perspective::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f39c12, transparent);
}

.current-perspective.hidden {
    display: none;
}

/* Row 1: Champion Info and Button */
.perspective-main-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
}

.current-perspective img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
}

.current-perspective-info h3 {
    color: #f39c12;
    margin-bottom: 5px;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.current-perspective-info p {
    color: #bdc3c7;
    font-size: 0.95em;
}

.change-perspective-btn {
    margin-left: auto;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

.change-perspective-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

/* Row 2: Settings Controls */
.perspective-settings-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(20, 20, 30, 0.6) 100%);
    border-top: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

/* Unified Control Styles for Settings Row */
.visibility-control,
.role-flair-control,
.username-control,
.splash-art-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

.control-label {
    color: #f39c12;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

.control-dropdown {
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 140px;
}

.control-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #f39c12;
}

.control-dropdown:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.control-dropdown option {
    background: #16213e;
    color: #ecf0f1;
    padding: 8px;
}

/* Username Control with Hover Preview */
.username-control {
    position: relative;
}

.username-control .control-dropdown {
    min-width: 180px;
}

.username-control .control-dropdown:hover::after {
    content: attr(data-preview);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    background: rgba(243, 156, 18, 0.95);
    color: #1a1a1a;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    pointer-events: none;
    animation: fadeInTooltip 0.2s ease;
}

.username-control .control-dropdown:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(243, 156, 18, 0.95);
    z-index: 1001;
    pointer-events: none;
    animation: fadeInTooltip 0.2s ease;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Legacy class support (deprecated - use .control-dropdown) */
.visibility-dropdown,
.role-flair-dropdown {
    /* Redirect to unified control-dropdown styles */
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 140px;
}

.visibility-dropdown:hover,
.role-flair-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #f39c12;
}

.visibility-dropdown:focus,
.role-flair-dropdown:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.visibility-dropdown option,
.role-flair-dropdown option {
    background: #16213e;
    color: #ecf0f1;
    padding: 8px;
}

/* Visibility status classes for styling */
.visibility-private {
    color: #e74c3c;
}

.visibility-twitch-subs {
    color: #9b59b6;
}

.visibility-public {
    color: #2ecc71;
}

/* Legacy label classes (deprecated - use .control-label) */
.visibility-label,
.role-flair-label {
    color: #f39c12;
    font-size: 0.9em;
    font-weight: 600;
}

/* Mobile Responsive - Perspective Header */
@media (max-width: 768px) {
    .perspective-main-row {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .change-perspective-btn {
        margin-left: 0;
        width: 100%;
    }

    .perspective-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .visibility-control,
    .role-flair-control,
    .username-control,
    .splash-art-control {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .control-dropdown {
        width: 100%;
    }

    .username-control .control-dropdown:hover::after {
        left: 50%;
        bottom: calc(100% + 8px);
    }

    .username-control .control-dropdown:hover::before {
        left: 50%;
    }
}

/* Tooltip icon */
.tooltip-icon {
    display: inline-block;
    margin-left: 5px;
    cursor: help;
    color: #f39c12;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tooltip-icon:hover {
    opacity: 1;
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(243, 156, 18, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tab-btn {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    color: #d4d4d4;
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1em;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.3), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(230, 126, 34, 0.15) 100%);
    border-color: #f39c12;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #0a0a0f;
    border-color: #f39c12;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tab-btn.active::before {
    display: none;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls.hidden {
    display: none;
}

/* Master Position Filter Container (in controls row) */
.master-position-filter-container {
    display: flex;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

input[type="text"], select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #e4e4e4;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #f39c12;
    background-color: rgba(255, 255, 255, 0.15);
}

select {
    cursor: pointer;
}

select option {
    background: #16213e;
    color: #e4e4e4;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-primary {
    background: #f39c12;
    color: white;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e4e4;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Stats */
.stats {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(243, 156, 18, 0.2);
    justify-content: space-around;
}

.stats.hidden {
    display: none;
}

.stat-card {
    flex: 0 1 auto;
    min-width: auto;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card:last-child {
    border-right: none;
}

.stat-card h3 {
    font-size: 0.8em;
    color: #95a5a6;
    margin-bottom: 0;
    font-weight: 500;
}

.stat-card p {
    font-size: 1.1em;
    color: #f39c12;
    font-weight: bold;
    margin: 0;
}

/* Matchups Grid */
.matchups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.matchup-card {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.matchup-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.7);
    border-color: #f39c12;
    box-shadow: 0 8px 16px rgba(243, 156, 18, 0.2);
}

.matchup-card.no-data {
    opacity: 0.5;
    border: 2px dashed rgba(243, 156, 18, 0.3);
}

/* Build Card Styles */
.build-card {
    cursor: default; /* Don't show pointer on build cards */
}

.build-card:hover {
    transform: none; /* Don't lift on hover */
}

.build-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.build-card-header h3 {
    color: #f39c12;
    margin: 0;
    font-size: 1.2em;
}

.build-card-actions {
    display: flex;
    gap: 10px;
}

.delete-btn-small {
    padding: 5px 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.delete-btn-small:hover {
    background: #c0392b;
}

.build-description {
    color: #bdc3c7;
    font-size: 0.9em;
    margin: 10px 0;
    font-style: italic;
}

.build-usage-stats {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    font-size: 0.85em;
}

.champion-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Picture element wrapper for WebP support - invisible to layout */
picture {
    display: contents;
}

.champion-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #f39c12;
}

.champion-info h2 {
    font-size: 1.5em;
    color: #f39c12;
    margin-bottom: 5px;
}

.difficulty {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.difficulty.easy { background: #27ae60; color: white; }
.difficulty.medium { background: #f39c12; color: white; }
.difficulty.hard { background: #e74c3c; color: white; }
.difficulty.cooked { background: #c0392b; color: white; font-weight: bold; }
.difficulty.trolling { background: #9b59b6; color: white; }

.edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #f39c12;
    border-radius: 6px;
    color: #f39c12;
    cursor: pointer;
    font-size: 0.85em;
}

.edit-btn:hover {
    background: #f39c12;
    color: white;
}

.no-data-message {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

.add-data-btn {
    display: block;
    margin: 10px auto 0;
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.add-data-btn:hover {
    background: #229954;
}

.build-section {
    margin: 15px 0;
}

.build-section h4 {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-bottom: 8px;
}

/* Side-by-side layout for Starting Items and Summoner Spells */
.items-summoners-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.items-summoners-row .subsection {
    flex: 1;
    min-width: 0;
}

.items-summoners-row .subsection h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.items-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.item-img, .summoner-img, .rune-img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    border: 2px solid rgba(243, 156, 18, 0.3);
}

/* Final Build Display */
.final-build-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-width: 300px;
}

/* Situational Items Display */
.situational-items-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 300px;
}

.situational-items-row .build-item-img {
    width: 45px;
    height: 45px;
}

.build-item-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    border: 2px solid rgba(243, 156, 18, 0.5);
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.build-item-img:hover {
    border-color: #f39c12;
    transform: scale(1.1);
    z-index: 10;
}

.empty-item-slot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

/* Phase 3C: Build Item Visual Indicators (Season 2026) */

/* 3C.8: Optional Item Styling - purple highlight */
.build-item-optional {
    border: 2px solid rgba(155, 89, 182, 0.6) !important;
    background: rgba(155, 89, 182, 0.15) !important;
    position: relative;
}

.build-item-optional::after {
    content: "OPT";
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #9b59b6;
    font-weight: bold;
}

/* 3C.9: Legendary Item Badge - lightning bolt */
.build-item-legendary {
    position: relative;
}

.build-item-legendary::before {
    content: "⚡";
    position: absolute;
    top: -6px;
    left: -6px;
    font-size: 10px;
    background: #1a1a2e;
    border-radius: 50%;
    padding: 1px;
    z-index: 5;
}

/* 3C.10: Bot-Only Slot Indicator */
.build-slot-bot-only {
    position: relative;
}

.build-slot-bot-only.empty::after {
    content: "Bot Only";
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #f39c12;
    white-space: nowrap;
}

.build-slot-bot-only.hidden {
    display: none;
}

.description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.95em;
}

.last-updated {
    margin-top: 10px;
    font-size: 0.85em;
    color: #7f8c8d;
    text-align: right;
}

@media (max-width: 768px) {
    .matchups-grid {
        grid-template-columns: 1fr;
    }
}

/* Backdrop Overlay for Expanded Cards */
.expanded-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Expanded Card Styles */
.matchup-card.expanded {
    position: relative;
    max-width: 1000px;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #f39c12;
    cursor: default;
    transform: none;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

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

.matchup-card.expanded:hover {
    transform: none;
}

/* Builds Library - narrower expanded card */
.matchup-card.build-library-expanded {
    max-width: 550px;
}

.expanded-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(243, 156, 18, 0.3);
}

.champion-image-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
}

.expanded-champion-info h2 {
    font-size: 1.5em;
    color: #f39c12;
    margin-bottom: 6px;
}

.expanded-section {
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.expanded-section h3 {
    color: #f39c12;
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Builds and Runes Side-by-Side Layout (legacy - kept for backwards compatibility) */
.builds-runes-split {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 4px 0 -4px 0;
}

.builds-column {
    flex: 0 0 60%;
    max-width: 582px;
}

.runes-column {
    flex: 0 0 40%;
    max-width: 388px;
}

/* Responsive: Stack vertically on smaller screens */
@media (max-width: 900px) {
    .builds-runes-split {
        flex-direction: column;
    }

    .builds-column,
    .runes-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ========================================
   PRE-GAME + BUILDS TWO-COLUMN LAYOUT
   New layout: Pre-game setup (left) | Builds (right)
   ======================================== */

.pregame-builds-split {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin: 4px 0 0 0;
}

/* Left column: Pre-game setup (items, summoners, runes) */
.pre-game-column {
    flex: 0 0 35%;
    max-width: 340px;
    min-width: 280px;
}

/* Right column: Builds */
.pregame-builds-split .builds-column {
    flex: 1 1 65%;
    max-width: none;
}

/* Pre-game setup section - tighter spacing */
.pre-game-setup-section {
    margin: 0;
    padding: 10px;
}

.pre-game-setup-section h3 {
    margin-bottom: 8px;
}

/* Builds column section - match pre-game spacing */
.pregame-builds-split .builds-column .expanded-section {
    margin: 0;
    padding: 10px;
}

.pregame-builds-split .builds-column .expanded-section h3 {
    margin-bottom: 8px;
}

/* Styled container for pre-game elements */
.pre-game-setup-container {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    padding: 12px;
}

/* Individual sections within pre-game container */
.pre-game-section {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pre-game-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.pre-game-section h4 {
    color: #f39c12;
    font-size: 0.95em;
    margin-bottom: 6px;
    font-weight: 600;
}

.pre-game-section .items-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tighter spacing after pregame-builds section */
.pregame-builds-split + .expanded-section {
    margin-top: 4px;
}

/* Responsive: Stack vertically on smaller screens */
@media (max-width: 900px) {
    .pregame-builds-split {
        flex-direction: column;
    }

    .pre-game-column,
    .pregame-builds-split .builds-column {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* Side-by-side layout for expanded Starting Items and Summoner Spells */
.items-summoners-expanded {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.subsection-expanded {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: transparent;
}

.subsection-expanded h3 {
    color: #f39c12;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.item-detail, .summoner-detail, .rune-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.item-detail img, .summoner-detail img, .rune-detail img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #f39c12;
}

.detail-info {
    flex: 1;
}

.detail-info h4 {
    color: #f39c12;
    font-size: 1em;
    margin-bottom: 4px;
}

.detail-info p {
    color: #bdc3c7;
    font-size: 0.9em;
    line-height: 1.4;
}

.gold-total {
    display: inline-block;
    padding: 6px 12px;
    background: #f39c12;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 10px;
}

/* Build Tier Sections */
.build-tier-section {
    margin: 4px 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.build-tier-section.final-build-tier {
    border: 2px solid #f39c12;
    background: rgba(243, 156, 18, 0.08);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.35);
}

.build-tier-title {
    color: #bdc3c7;
    font-size: 0.9em;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.final-build-tier .build-tier-title {
    color: #f39c12;
    font-size: 1em;
}

.build-tier-grid {
    display: grid;
    grid-template-columns: repeat(6, 60px);
    gap: 4px;
    justify-content: start;
}

.build-tier-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 60px;
}

.build-tier-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid rgba(243, 156, 18, 0.5);
    border-radius: 6px;
    transition: all 0.2s;
}

.build-tier-item-name {
    font-size: 0.7em;
    color: #bdc3c7;
    text-align: center;
    line-height: 1.2;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.build-tier-item img:hover {
    transform: scale(1.15);
    border-color: #f39c12;
    z-index: 10;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.final-build-tier .build-tier-item img {
    border-color: rgba(243, 156, 18, 0.7);
}

.final-build-tier .build-tier-item img:hover {
    border-color: #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.7);
}

.build-tier-slot-empty {
    width: 50px;
    height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

/* Situational Items */
.situational-items {
    border: 2px solid #9b59b6;
    background: rgba(156, 89, 182, 0.08);
    box-shadow: 0 0 12px rgba(156, 89, 182, 0.3);
}

.situational-items .build-tier-title {
    color: #9b59b6;
}

.situational-items-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Inherits from .build-tier-item - no override needed */

.situational-items .build-tier-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-color: rgba(156, 89, 182, 0.5);
}

.situational-items .build-tier-item img:hover {
    border-color: #9b59b6;
    box-shadow: 0 0 15px rgba(156, 89, 182, 0.5);
}

/* Bot-Only Slot (6th item slot in Tier 3) */
.bot-only-slot {
    position: relative;
}

.bot-only-slot img {
    border: 2px solid #3498db !important;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.4);
}

.bot-only-slot:hover img {
    border-color: #5dade2 !important;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.6);
}

.build-tier-slot-empty.bot-only-slot {
    border-color: rgba(52, 152, 219, 0.4);
    background: rgba(52, 152, 219, 0.1);
}

.bot-only-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #3498db;
    color: white;
    font-size: 0.55em;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bot-only-label {
    font-size: 0.65em;
    color: #3498db;
    font-weight: 600;
}

/* Build Editor Styles */
.build-tier-editor {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.final-build-editor {
    border-color: rgba(243, 156, 18, 0.4);
    background: rgba(243, 156, 18, 0.05);
}

.situational-editor {
    border-color: rgba(156, 89, 182, 0.3);
    background: rgba(156, 89, 182, 0.05);
}

/* ============================================
   Build Tier Row System (Phase 3C)
   Per-tier item + boots layout
   ============================================ */

.build-tier-row {
    margin: 8px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.build-tier-row[data-tier="3"] {
    border: 2px solid rgba(243, 156, 18, 0.4);
    background: rgba(243, 156, 18, 0.05);
}

.build-tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.build-tier-header .build-tier-title {
    margin: 0;
    color: #bdc3c7;
    font-size: 1em;
    font-weight: 600;
}

.build-tier-row[data-tier="3"] .build-tier-title {
    color: #f39c12;
}

.build-tier-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.build-tier-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.build-item-slot {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.build-item-slot.filled {
    background: rgba(0, 0, 0, 0.3);
}

.build-item-slot.filled img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    border: 2px solid rgba(243, 156, 18, 0.5);
    transition: all 0.2s;
}

.build-item-slot.filled:hover img {
    transform: scale(1.1);
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.build-item-slot.empty {
    width: 50px;
    height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 1.5em;
}

.build-item-slot.empty:hover {
    border-color: rgba(243, 156, 18, 0.5);
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.build-item-slot.hidden {
    display: none;
}

/* Optional item styling (purple) */
.build-item-slot.build-item-optional img {
    border-color: rgba(155, 89, 182, 0.6);
}

.build-item-slot.build-item-optional:hover img {
    border-color: #9b59b6;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

/* Legendary item indicator */
.build-item-slot.build-item-legendary::before {
    content: "⚡";
    position: absolute;
    top: -6px;
    left: -6px;
    font-size: 12px;
    background: #1a1a2e;
    border-radius: 50%;
    padding: 2px;
    z-index: 5;
}

/* Bot-only slot indicator */
.build-item-slot.build-slot-bot-only {
    border-color: rgba(52, 152, 219, 0.4);
    background: rgba(52, 152, 219, 0.1);
}

.build-item-slot.build-slot-bot-only .bot-only-label {
    font-size: 10px;
    color: #3498db;
    font-weight: bold;
}

/* Boots divider */
.build-tier-boots-divider {
    width: 2px;
    min-height: 60px;
    background: rgba(52, 152, 219, 0.4);
    border-radius: 1px;
    align-self: stretch;
}

/* Boots slot container */
.build-tier-boots {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.boots-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 8px;
    background: rgba(52, 152, 219, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.boots-slot:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.2);
}

.boots-slot.filled img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
}

.boots-slot.empty {
    width: 68px;
    height: 68px;
    border-style: dashed;
}

.boots-slot .boots-placeholder {
    font-size: 28px;
}

.boots-slot-label {
    font-size: 0.75em;
    color: #3498db;
    margin-top: 4px;
}

.boots-slot-text {
    font-size: 0.75em;
    color: #3498db;
    text-align: center;
    line-height: 1.3;
}

/* T3 boot upgrade styling */
.boots-slot.boots-tier3-upgrade {
    border-color: rgba(243, 156, 18, 0.7);
    background: rgba(243, 156, 18, 0.1);
}

.boots-slot.boots-tier3-upgrade:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
}

.boots-tier3-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f39c12;
    color: #1a1a2e;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Add button in tier row */
.build-tier-items .btn-action.add {
    padding: 8px 12px;
    font-size: 0.85em;
}

/* Optional slots dropdown */
.optional-slots-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #9b59b6;
}

.optional-slots-dropdown {
    background: rgba(155, 89, 182, 0.2);
    border: 1px solid rgba(155, 89, 182, 0.4);
    color: #9b59b6;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.optional-slots-dropdown:hover {
    background: rgba(155, 89, 182, 0.3);
}

/* Situational items editor grid */
.situational-edit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.situational-edit-grid .build-edit-slot {
    position: relative;
    width: 54px;
    height: 54px;
}

.situational-edit-grid .build-edit-slot img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    border: 2px solid rgba(155, 89, 182, 0.5);
}

/* ============================================
   Build Library View Mode (Phase 3F)
   ============================================ */

/* Build tier view container (view mode) */
.build-tier-view {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Items grid within tier view */
.build-tier-items-grid {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Boots section in view mode */
.build-tier-boots-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
}

/* Boots slot styling for view mode */
.boots-slot-view {
    position: relative;
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 8px;
    background: rgba(52, 152, 219, 0.1);
    padding: 4px;
}

.boots-slot-view.boots-tier3-upgrade {
    border-color: rgba(243, 156, 18, 0.7);
    background: rgba(243, 156, 18, 0.1);
}

.boots-slot-view.build-tier-slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-style: dashed;
}

/* ============================================
   Season 2026 Role Quest Styles
   ============================================ */

/* Role Quest Badge */
.role-quest-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 0.75em;
    font-weight: 600;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Role Quest Highlight (for Mid/Bot boots sections) */
.role-quest-highlight {
    border-color: rgba(243, 156, 18, 0.5) !important;
    background: rgba(243, 156, 18, 0.08) !important;
}

.role-quest-section {
    border-color: rgba(243, 156, 18, 0.4);
    background: rgba(243, 156, 18, 0.05);
}

/* Boots Editor Section */
.boots-editor {
    border-color: rgba(52, 152, 219, 0.4);
    background: rgba(52, 152, 219, 0.05);
}

.boots-editor .build-tier-title {
    color: #3498db;
}

.boots-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.boots-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(52, 152, 219, 0.6);
    border-radius: 8px;
    min-width: 120px;
}

.boots-slot.role-quest-slot {
    border-color: rgba(243, 156, 18, 0.7);
    background: rgba(243, 156, 18, 0.1);
}

.boots-slot img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.boots-name {
    font-size: 0.85em;
    color: #ecf0f1;
    text-align: center;
}

.tier3-upgrade-info {
    font-size: 0.75em;
    color: #f39c12;
    margin-top: 4px;
    font-style: italic;
}

.boots-slot-empty {
    padding: 15px 20px;
    border: 2px dashed rgba(52, 152, 219, 0.4);
    border-radius: 8px;
    color: #95a5a6;
    font-style: italic;
}

/* Boots Display Section (View Mode) */
.boots-display-section {
    border-color: rgba(52, 152, 219, 0.3);
    background: rgba(52, 152, 219, 0.05);
}

.boots-display-section .build-tier-title {
    color: #3498db;
}

.boots-display {
    display: flex;
    gap: 10px;
}

.boots-item img {
    border-color: rgba(52, 152, 219, 0.5);
}

.boots-item img:hover {
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.build-edit-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    max-width: 450px;
}

.situational-edit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.build-edit-slot {
    position: relative;
    aspect-ratio: 1;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.build-edit-slot.filled {
    border: 2px solid rgba(243, 156, 18, 0.6);
    background: rgba(0, 0, 0, 0.5);
}

.build-edit-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.situational-edit-grid .build-edit-slot {
    width: 64px;
    height: 64px;
}

.remove-build-item-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-build-item-btn:hover {
    background: #c0392b;
}

.add-build-item-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.2s;
}

.add-build-item-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: scale(1.05);
}

/* Item Picker Modal */
.item-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.item-picker-modal.hidden {
    display: none;
}

.item-picker-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #f39c12;
    border-radius: 12px;
    padding: 20px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
}

.item-picker-content h3 {
    color: #f39c12;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-picker-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

.close-picker-btn:hover {
    background: #c0392b;
}

.item-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #f39c12;
}

.category-btn.active {
    background: #f39c12;
    border-color: #f39c12;
    color: white;
}

.item-search-input {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    outline: none;
    transition: all 0.2s;
}

.item-search-input:focus {
    border-color: #f39c12;
    background: rgba(0, 0, 0, 0.5);
}

.item-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.item-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.item-picker-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.item-picker-item:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
    transform: scale(1.05);
}

.item-picker-item img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
}

.item-picker-info {
    text-align: center;
    width: 100%;
}

.item-picker-name {
    color: #f39c12;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 4px;
}

.item-picker-cost {
    color: #bdc3c7;
    font-size: 0.8em;
}

.expanded-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(243, 156, 18, 0.3);
}

.close-expanded-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #f39c12;
    border-radius: 8px;
    color: #f39c12;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.close-expanded-btn:hover {
    background: rgba(243, 156, 18, 0.2);
    transform: scale(1.05);
}

.expanded-edit-btn {
    padding: 10px 20px;
    background: #f39c12;
    border: 2px solid #f39c12;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.expanded-edit-btn:hover {
    background: #e67e22;
    border-color: #e67e22;
    transform: scale(1.05);
}

.expanded-description {
    color: #e4e4e4;
    line-height: 1.8;
    font-size: 1em;
    white-space: pre-wrap;
}

.no-data-placeholder {
    color: #7f8c8d;
    font-style: italic;
    padding: 10px;
}

/* ===== BOOTS PICKER MODAL ===== */

.boots-picker-modal {
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
}

.boots-picker-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boots-icon {
    font-size: 1.2em;
}

/* Boots State Overview */
.boots-state-overview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
}

.boots-state-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 60px;
}

.boots-state-tier.active {
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid #f39c12;
}

.tier-label {
    font-size: 0.75em;
    color: #7f8c8d;
    font-weight: bold;
}

.boots-state-tier.active .tier-label {
    color: #f39c12;
}

.boots-state-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.boots-state-none {
    color: #7f8c8d;
    font-size: 1.2em;
}

.boots-state-arrow {
    color: #7f8c8d;
    font-size: 1.2em;
}

/* Info Message */
.boots-picker-info {
    padding: 12px;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.boots-picker-info p {
    margin: 0;
    color: #bdc3c7;
}

.boots-picker-info p:first-child {
    color: #3498db;
    margin-bottom: 5px;
}

/* Boot Options */
.boots-picker-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.boots-picker-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.boots-picker-option:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.boots-picker-option.selected {
    background: rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

/* Radio Button */
.boots-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #7f8c8d;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.boots-option-radio.checked {
    border-color: #3498db;
}

.boots-option-radio.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
}

/* Boot Image */
.boots-option-img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.boots-picker-option.selected .boots-option-img {
    border-color: #3498db;
}

/* No Boots Icon */
.boots-option-empty {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.no-boots-icon {
    font-size: 24px;
    color: #7f8c8d;
}

/* Boot Info */
.boots-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.boots-option-name {
    color: #ecf0f1;
    font-weight: 500;
}

.boots-option-desc {
    font-size: 0.8em;
    color: #7f8c8d;
}

.boots-option-note {
    font-size: 0.75em;
    color: #e74c3c;
    font-style: italic;
}

/* T3 Upgrade Preview */
.boots-option-images {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boots-option-img-main {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.boots-upgrade-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
}

.upgrade-arrow-small {
    color: #f39c12;
    font-size: 12px;
}

.boots-option-img-preview {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid rgba(243, 156, 18, 0.5);
}

.boots-picker-option:hover .boots-upgrade-preview {
    opacity: 1;
}

.boots-option-upgrade {
    font-size: 0.8em;
    color: #f39c12;
}

.boots-option-upgrade strong {
    color: #f1c40f;
}

/* Divider */
.boots-picker-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: #7f8c8d;
    font-size: 0.85em;
}

.boots-picker-divider::before,
.boots-picker-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Warning Area */
.boots-warning-area {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.boots-warning-area.visible {
    max-height: 200px;
}

.boots-warning {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.boots-warning-downgrade {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.boots-warning-gap {
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.4);
}

.boots-warning-icon {
    font-size: 24px;
}

.boots-warning-content strong {
    color: #e74c3c;
    display: block;
    margin-bottom: 5px;
}

.boots-warning-gap .boots-warning-content strong {
    color: #f39c12;
}

.boots-warning-content p {
    color: #bdc3c7;
    font-size: 0.9em;
    margin: 0;
}

.boots-warning-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-warning-confirm {
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-warning-confirm:hover {
    background: rgba(231, 76, 60, 0.5);
}

.btn-warning-cancel {
    background: rgba(149, 165, 166, 0.2);
    border: 1px solid #95a5a6;
    color: #95a5a6;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-warning-cancel:hover {
    background: rgba(149, 165, 166, 0.4);
}

/* Actions */
.boots-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Edit Mode Styles */
.matchup-card.editing {
    border: 3px solid #27ae60;
    box-shadow: 0 0 30px rgba(39, 174, 96, 0.3);
}

.edit-mode-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #27ae60;
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.edit-difficulty-select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #f39c12;
    border-radius: 8px;
    color: #e4e4e4;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-difficulty-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #e67e22;
}

.edit-difficulty-select:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.3);
}

.edit-difficulty-select option {
    background: #1a1a2e;
    color: #e4e4e4;
    padding: 10px;
}

.edit-description-textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #f39c12;
    border-radius: 8px;
    color: #e4e4e4;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    transition: all 0.3s;
}

.edit-description-textarea:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #e67e22;
}

.edit-description-textarea:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.3);
}

.edit-description-textarea::placeholder {
    color: #7f8c8d;
}

/* Item and Summoner Selector Styles */
.subsection-title {
    color: #bdc3c7;
    font-size: 0.95em;
    margin: 15px 0 10px 0;
}

.gold-counter {
    display: inline-block;
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 15px;
}

.gold-counter.over-budget {
    background: #e74c3c;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.item-selector-grid, .summoner-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.item-selector-icon, .summoner-selector-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
}

.item-selector-icon:hover, .summoner-selector-icon:hover {
    border-color: #f39c12;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.item-selector-icon.selected, .summoner-selector-icon.selected {
    border-color: #27ae60;
    border-width: 4px;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
}

.item-selector-icon img, .summoner-selector-icon img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.item-cost {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: #f39c12;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
}

.selected-items-container, .selected-summoners-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.selected-item, .selected-summoner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid #27ae60;
    border-radius: 8px;
}

.selected-item img, .selected-summoner img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.selected-item span, .selected-summoner span {
    color: #e4e4e4;
    font-size: 0.9em;
}

.remove-item-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    transition: all 0.3s;
}

.remove-item-btn:hover {
    background: #c0392b;
    transform: scale(1.2);
}

/* Rune Text Display (temporary fix for broken Community Dragon URLs) */
.rune-text-display {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rune-name {
    color: #f39c12;
    font-weight: bold;
    font-size: 0.95em;
}

.rune-tree {
    color: #95a5a6;
    font-size: 0.8em;
    font-style: italic;
}

/* Rune Selector Styles */
.rune-tree-section {
    margin-bottom: 20px;
}

.rune-tree-title {
    color: #f39c12;
    font-size: 1em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rune-tree-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.rune-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.rune-selector-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(243, 156, 18, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
}

.rune-selector-icon:hover {
    border-color: #f39c12;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.rune-selector-icon.selected {
    border-color: #27ae60;
    border-width: 4px;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
}

.rune-selector-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.selected-rune-container {
    margin-top: 10px;
}

.selected-rune {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid #27ae60;
    border-radius: 8px;
    max-width: fit-content;
}

.selected-rune img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #27ae60;
}

.selected-rune-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-rune-name {
    color: #f39c12;
    font-weight: bold;
    font-size: 0.95em;
}

.selected-rune-tree {
    color: #95a5a6;
    font-size: 0.85em;
    font-style: italic;
}

/* ===== RUNE VISUAL DISPLAY (Option C: Compact Vertical Layout) ===== */
/* CSS Custom Properties for easy size adjustments */
:root {
    --rune-keystone-size: 48px;
    --rune-regular-size: 36px;
    --rune-keystone-border: 3px;
    --rune-regular-border: 2px;
    --stat-shard-container-size: 28px;
    --stat-shard-icon-size: 20px;
}

.rune-visual-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0;
}

.rune-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rune-section-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #bdc3c7;
}

.rune-icons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Rune Icons */
.rune-icon {
    border-radius: 50%;
    border-style: solid;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rune-icon.rune-keystone {
    width: var(--rune-keystone-size);
    height: var(--rune-keystone-size);
    border-width: var(--rune-keystone-border);
}

.rune-icon.rune-regular {
    width: var(--rune-regular-size);
    height: var(--rune-regular-size);
    border-width: var(--rune-regular-border);
    opacity: 0.9;
}

.rune-icon:hover {
    transform: scale(1.1);
    opacity: 1;
    filter: brightness(1.2);
}

/* Stat Shards */
.stat-shard-container {
    width: var(--stat-shard-container-size);
    height: var(--stat-shard-container-size);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-shard-container:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-shard-icon {
    width: var(--stat-shard-icon-size);
    height: var(--stat-shard-icon-size);
}

/* Responsive adjustments - Override CSS variables at different breakpoints */
@media (max-width: 768px) {
    :root {
        --rune-keystone-size: 42px;
        --rune-regular-size: 32px;
        --stat-shard-container-size: 24px;
        --stat-shard-icon-size: 18px;
    }

    .rune-section-label {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    :root {
        --rune-keystone-size: 38px;
        --rune-regular-size: 28px;
        --stat-shard-container-size: 22px;
        --stat-shard-icon-size: 16px;
    }
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
    animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
    opacity: 0;
}

.notification-toast.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.notification-toast.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.notification-toast.show {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Export button with unsaved changes indicator */
.btn-export-unsaved {
    position: relative;
    animation: pulseExport 2s infinite;
}

.btn-export-unsaved::before {
    content: '●';
    position: absolute;
    top: -5px;
    right: -5px;
    color: #e74c3c;
    font-size: 1.5em;
    animation: pulse 1.5s infinite;
}

@keyframes pulseExport {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    }
    50% {
        box-shadow: 0 2px 20px rgba(243, 156, 18, 0.6);
    }
}

/* Rune Pages Library Styles */
.rune-page-summary {
    margin: 15px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
}

.rune-page-summary > div {
    margin: 6px 0;
    color: #ecf0f1;
}

.rune-page-summary strong {
    color: #f39c12;
}

.rune-tree-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rune-display-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 2px solid rgba(243, 156, 18, 0.3);
}

.rune-display-item.keystone {
    border-color: rgba(243, 156, 18, 0.6);
    background: rgba(243, 156, 18, 0.1);
}

.rune-display-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(243, 156, 18, 0.5);
}

.rune-display-item.keystone img {
    width: 64px;
    height: 64px;
    border-width: 3px;
}

.rune-info h4 {
    color: #f39c12;
    margin: 0 0 5px 0;
    font-size: 1em;
}

.rune-info p {
    color: #bdc3c7;
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.stat-shards-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-shard-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 6px;
    color: #3498db;
    font-size: 0.9em;
    font-weight: 600;
}

/* Rune Page Builder Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: #1a252f;
    border: 2px solid #f39c12;
    border-radius: 12px;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid rgba(243, 156, 18, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #f39c12;
    margin: 0;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    color: #c0392b;
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid rgba(243, 156, 18, 0.3);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #f39c12;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 6px;
    color: #ecf0f1;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
}

#runePageBuilderModal {
    z-index: 1000; /* Higher than expanded-backdrop (999) */
}

.rune-builder-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    width: 95vw;
}

.rune-builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.rune-tree-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
}

.rune-tree-section h3 {
    color: #f39c12;
    margin-bottom: 15px;
}

.rune-tree-section select {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 6px;
    color: #ecf0f1;
    font-size: 1em;
    margin-bottom: 15px;
}

.rune-tree-section select option {
    background: #2c3e50;
    color: #ecf0f1;
}

.rune-slots-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rune-slot {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(243, 156, 18, 0.2);
}

.rune-slot.keystone {
    border-color: rgba(243, 156, 18, 0.5);
}

.rune-slot-label {
    color: #f39c12;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: 600;
}

.rune-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.rune-option {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.rune-option:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.6);
}

.rune-option.selected {
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.rune-option img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.rune-slot.keystone .rune-option img {
    width: 64px;
    height: 64px;
}

.rune-option-name {
    font-size: 0.75em;
    text-align: center;
    color: #bdc3c7;
    line-height: 1.2;
}

.stat-shards-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.stat-shards-section h3 {
    color: #f39c12;
    margin-bottom: 15px;
}

.stat-shard-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-shard-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-shard-row label {
    color: #ecf0f1;
    font-weight: 600;
    min-width: 140px;
}

.stat-shard-options {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 400px;
}

.stat-shard-description {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
    border-radius: 6px;
}

.stat-shard-description p {
    margin: 0;
    color: #bdc3c7;
    font-size: 0.9em;
    line-height: 1.4;
    font-style: italic;
}

.stat-shard-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-shard-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.6);
}

.stat-shard-btn.selected {
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.shard-icon {
    font-size: 1.5em;
}

.stat-shard-btn span:last-child {
    font-size: 0.85em;
    text-align: center;
}

/* Rune Description Styles */
.rune-description {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid #f39c12;
}

.rune-desc-text {
    color: #bdc3c7;
    font-size: 0.85em;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

/* Build Notes Styles */
.build-notes-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #f39c12;
    border-radius: 6px;
}

.build-notes-content {
    color: #e4e4e4;
    line-height: 1.7;
    font-size: 0.95em;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Optional Slots Styles */
.optional-slot {
    position: relative;
    border: 3px solid #9b59b6 !important;
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.4);
}

/* Optional slot indicator for collapsed view */
.item-row.optional-slot {
    border: 2px solid #9b59b6 !important;
    box-shadow: 0 0 6px rgba(155, 89, 182, 0.3);
}

/* Playbook Styles */
.playbook-view {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.playbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f39c12;
}

.playbook-header h2 {
    color: #f39c12;
    font-size: 2em;
}

.playbook-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.star-rating {
    color: #f39c12;
    font-size: 1.2em;
    letter-spacing: 2px;
    margin: 8px 0;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
    background: #3498db;
    color: white;
}

.playbook-bullet-list {
    margin: 10px 0;
    padding-left: 20px;
    line-height: 1.8;
}

.playbook-bullet-list li {
    margin: 8px 0;
    color: #ecf0f1;
}

.playbook-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .playbook-section-grid {
        grid-template-columns: 1fr;
    }
}

/* Playbook Editor Modal Styles */
.playbook-editor-content {
    max-width: 1200px;
    max-height: 85vh;
    width: 95vw;
    overflow-y: auto;
}

.playbook-editor-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(243, 156, 18, 0.3);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.playbook-editor-tabs .tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 6px 6px 0 0;
    color: #bdc3c7;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.playbook-editor-tabs .tab-btn.active {
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    color: #f39c12;
}

.playbook-tab-content {
    min-height: 400px;
    padding: 10px 0;
}

.char-counter {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 4px;
    text-align: right;
}

.char-counter.warning {
    color: #e67e22;
    font-weight: 600;
}

.char-counter.danger {
    color: #e74c3c;
    font-weight: 700;
}

.star-rating-input {
    display: flex;
    gap: 5px;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    margin: 8px 0;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-rating-input label {
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #f39c12;
}

.dynamic-list-container {
    border: 2px solid rgba(243, 156, 18, 0.2);
    border-radius: 6px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    margin: 10px 0;
}

.dynamic-list-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.dynamic-list-item input,
.dynamic-list-item textarea {
    flex: 1;
}

.dynamic-list-item button {
    padding: 8px 14px;
    background: #e74c3c;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.dynamic-list-item button:hover {
    background: #c0392b;
}

.add-list-item-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
    border-radius: 6px;
    color: #2ecc71;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.add-list-item-btn:hover {
    background: rgba(46, 204, 113, 0.3);
}

.playbook-editor-content .form-group {
    margin-bottom: 20px;
}

.playbook-editor-content .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ecf0f1;
    font-weight: 600;
}

.playbook-editor-content input[type="text"],
.playbook-editor-content input[type="number"],
.playbook-editor-content select,
.playbook-editor-content textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 6px;
    color: #ecf0f1;
    font-family: inherit;
    font-size: 14px;
}

.playbook-editor-content input:focus,
.playbook-editor-content select:focus,
.playbook-editor-content textarea:focus {
    outline: none;
    border-color: #f39c12;
    background: rgba(255, 255, 255, 0.08);
}

.playbook-editor-content textarea {
    resize: vertical;
    min-height: 60px;
}

/* Objective Priority Grid */
.objective-priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 10px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(243, 156, 18, 0.2);
    border-radius: 6px;
}

.objective-priority-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.objective-priority-item label {
    font-size: 0.9em;
    color: #ecf0f1;
    font-weight: 500;
}

.objective-priority-select {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 4px;
    color: #ecf0f1;
    cursor: pointer;
    font-size: 0.95em;
}

.objective-priority-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #f39c12;
}

.objective-priority-select:focus {
    outline: none;
    border-color: #f39c12;
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ecf0f1;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.skill-order-helper {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.skill-order-helper button {
    padding: 8px 16px;
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid #3498db;
    border-radius: 6px;
    color: #3498db;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}

.skill-order-helper button:hover {
    background: rgba(52, 152, 219, 0.3);
}

/* ===== YOUTUBE INPUT SECTION ===== */

.youtube-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 0, 0, 0.03);
    border: 1px solid rgba(255, 0, 0, 0.15);
    border-radius: 8px;
}

.youtube-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #ecf0f1;
}

.youtube-icon-red {
    width: 20px;
    height: 20px;
    filter: none; /* Keep YouTube red color */
}

.optional-badge {
    font-size: 0.75em;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #95a5a6;
    font-weight: 400;
}

.youtube-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.youtube-url-input {
    flex: 1;
    padding: 10px 40px 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ecf0f1;
    font-size: 0.95em;
    transition: border-color 0.2s, background-color 0.2s;
}

.youtube-url-input:focus {
    outline: none;
    border-color: rgba(255, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.youtube-url-input.valid {
    border-color: rgba(46, 204, 113, 0.5);
}

.youtube-url-input.invalid {
    border-color: rgba(231, 76, 60, 0.5);
}

.youtube-url-input::placeholder {
    color: #7f8c8d;
}

.youtube-clear-btn {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(231, 76, 60, 0.2);
    border: none;
    border-radius: 4px;
    color: #e74c3c;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.youtube-clear-btn:hover {
    background: rgba(231, 76, 60, 0.4);
}

.youtube-clear-btn.hidden {
    display: none;
}

.youtube-validation {
    min-height: 20px;
    margin-top: 6px;
    font-size: 0.85em;
}

.youtube-validation .valid {
    color: #2ecc71;
}

.youtube-validation .invalid {
    color: #e74c3c;
}

.input-hint {
    margin-top: 8px;
    font-size: 0.8em;
    color: #7f8c8d;
}

/* ===== YOUTUBE MODAL ===== */

.youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.youtube-modal.visible {
    opacity: 1;
    visibility: visible;
}

.youtube-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 1;
}

.youtube-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.youtube-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.youtube-modal-close svg {
    width: 20px;
    height: 20px;
}

.youtube-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.youtube-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Prevent body scroll when modal is open */
body.youtube-modal-open {
    overflow: hidden;
}

/* ===== YOUTUBE BUTTON ON CARDS ===== */

.youtube-play-btn {
    padding: 4px 5px;
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-left: 8px;
}

.youtube-play-btn:hover {
    background: rgba(255, 0, 0, 0.25);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.05);
}

.youtube-play-btn:hover .youtube-btn-icon {
    filter: brightness(1.7);
}

.youtube-btn-icon {
    width: 28px;
    height: 28px;
    filter: brightness(1.5);
    transition: filter 0.2s ease;
}

/* ===== YOUTUBE PREVIEW IN EXPANDED CARD ===== */

.youtube-preview-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(243, 156, 18, 0.2);
}

.youtube-preview-card {
    display: block;
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.youtube-preview-card:hover {
    border-color: rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.2);
}

.youtube-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s;
}

.youtube-preview-card:hover .youtube-play-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.youtube-play-button-svg {
    width: 68px;
    height: 48px;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.youtube-preview-card:hover .youtube-play-button-svg {
    opacity: 1;
    transform: scale(1.1);
}

.youtube-no-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 10px;
    color: #bdc3c7;
}

.youtube-icon-large {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .youtube-modal-content {
        width: 95%;
    }

    .youtube-modal-close {
        top: -40px;
        width: 32px;
        height: 32px;
    }

    .youtube-btn-icon {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   Position Icons (Phase 4 - Position-Based Matchups)
   ============================================ */

/* Position Icons Container */
.position-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.position-icons-small {
    gap: 3px;
}

.position-icons-large {
    gap: 6px;
}

/* Base Position Icon */
.position-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.position-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Small size (collapsed cards) */
.position-icon.position-icon-small,
.position-icons-small .position-icon {
    width: 24px;
    height: 24px;
    padding: 2px;
}

/* Large size (modals) */
.position-icon.position-icon-large,
.position-icons-large .position-icon {
    width: 28px;
    height: 28px;
    padding: 3px;
}

/* Selected state - Gold border + glow */
.position-icon.selected {
    border-color: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
    background: rgba(243, 156, 18, 0.1);
}

/* Has data state - Purple border */
.position-icon.has-data {
    border-color: #9b59b6;
    opacity: 0.9;
}

.position-icon.has-data:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: #8e44ad;
    box-shadow: 0 0 6px rgba(155, 89, 182, 0.4);
}

/* No data state - Red border + dimmed */
.position-icon.no-data {
    border-color: #e74c3c;
    opacity: 0.4;
    filter: grayscale(30%);
}

.position-icon.no-data:hover {
    opacity: 0.7;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ============================================
   Master Position Filter (Toolbar)
   ============================================ */

.master-position-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0 15px;
}

.master-position-filter .position-icon {
    width: 36px;
    height: 36px;
    opacity: 0.6;
    border: 2px solid #444;
    background: rgba(0, 0, 0, 0.3);
}

.master-position-filter .position-icon:hover {
    opacity: 0.9;
    border-color: #666;
    transform: scale(1.1);
}

.master-position-filter .position-icon.active {
    opacity: 1;
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    background: rgba(243, 156, 18, 0.15);
}

/* ============================================
   Position Selection Modal
   ============================================ */

.position-selection-modal .modal-body {
    padding: 20px;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 10px;
}

.position-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.2);
}

.position-option:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

.position-option.selected {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
    box-shadow: 0 0 12px rgba(243, 156, 18, 0.4);
}

.position-option img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.position-option span {
    font-size: 14px;
    color: #ecf0f1;
    font-weight: 500;
}

/* ============================================
   Sync to Positions Modal (Phase 4 - Task 4F)
   ============================================ */

/* Field checkbox labels */
.sync-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sync-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(155, 89, 182, 0.3);
}

.sync-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #9b59b6;
    cursor: pointer;
}

.sync-checkbox-label span {
    color: #ecf0f1;
    font-size: 0.9em;
}

.sync-checkbox-label:has(input:checked) {
    background: rgba(155, 89, 182, 0.15);
    border-color: rgba(155, 89, 182, 0.4);
}

/* Position checkbox labels */
.sync-position-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.sync-position-checkbox:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(155, 89, 182, 0.3);
}

.sync-position-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #9b59b6;
    cursor: pointer;
}

.sync-position-checkbox:has(input:checked) {
    background: rgba(155, 89, 182, 0.2);
    border-color: #9b59b6;
}

.sync-position-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ecf0f1;
    font-size: 0.95em;
    font-weight: 500;
}

.sync-position-icon {
    width: 20px;
    height: 20px;
}

/* No targets message */
.sync-no-targets {
    text-align: center;
    padding: 10px;
}

/* ============================================
   Card Position Mismatch State
   (When master filter doesn't match card's position)
   ============================================ */

.matchup-card.position-mismatch {
    opacity: 0.7;
    position: relative;
}

.matchup-card.position-mismatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

/* Position indicator badge on mismatched cards */
.position-mismatch-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
}

/* ============================================
   Position Icons in Card Header
   ============================================ */

.card-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: absolute;
    top: 10px;
    right: 15px;
}

.card-header-actions .position-icons {
    margin-bottom: 2px;
}

.card-header-actions .card-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Expanded card header actions (position icons on right side) */
.expanded-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.expanded-header-actions .position-icons {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Larger position icons in expanded card */
.expanded-header-actions .position-icon {
    width: 32px;
    height: 32px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .position-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .position-option img {
        width: 36px;
        height: 36px;
    }

    .position-option span {
        font-size: 12px;
    }

    .master-position-filter {
        padding: 0 10px;
        gap: 6px;
    }

    .master-position-filter .position-icon {
        width: 30px;
        height: 30px;
    }

    .position-icons-small .position-icon,
    .position-icon.position-icon-small {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .position-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 5px;
    }

    .position-option {
        padding: 10px 5px;
    }

    .position-option img {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }

    .position-option span {
        font-size: 10px;
    }
}

/* Position Strategy Section (Phase 4 - Task 4H) */
.position-strategy-section {
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.position-strategy-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-badge {
    background: #9b59b6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.position-strategy {
    font-style: italic;
    color: #bdc3c7;
}

.field-hint {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0 0 10px 0;
    font-style: italic;
}
