.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
}
:root {
            --primary-pink: #ff69b4;
            --dark-pink: #ff1493;
            --bg-dark: #1a0a1a;
            --bg-light: #2a0f2a;
            --text-light: #fff0f5;
            --text-dim: #e0b0ff;
            --blue-team: #3498db;
            --red-team: #e74c3c;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Quicksand', sans-serif;
        }
        
        body {
            background-color: var(--bg-dark);
            color: var(--text-light);
            background-image: 
                radial-gradient(circle at 10% 20%, rgba(255, 105, 180, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 90% 80%, rgba(255, 20, 147, 0.1) 0%, transparent 20%);
            position: relative;
            overflow-x: hidden;
            min-height: 100vh;
        }
        
        /* Animated Background Elements */
        .magic-star {
            position: fixed;
            width: 3px;
            height: 3px;
            background-color: var(--primary-pink);
            border-radius: 50%;
            box-shadow: 0 0 10px 2px var(--primary-pink);
            animation: twinkle 5s infinite ease-in-out;
            z-index: -1;
        }
        
        .magic-bubble {
            position: fixed;
            width: 15px;
            height: 15px;
            border: 1px solid rgba(255, 105, 180, 0.5);
            border-radius: 50%;
            animation: float 15s infinite linear;
            z-index: -1;
            opacity: 0.6;
        }
        
        @keyframes twinkle {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }
        
        @keyframes float {
            0% { transform: translateY(0) translateX(0); opacity: 0; }
            10% { opacity: 0.6; }
            90% { opacity: 0.6; }
            100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
        }
        
        /* Header Styles */
        header {
            background: linear-gradient(90deg, rgba(26, 10, 26, 0.9) 0%, rgba(42, 15, 42, 0.95) 100%);
            backdrop-filter: blur(10px);
            padding: 1rem 2rem;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid var(--dark-pink);
            box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
        }
        
        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .logo {
            font-family: 'Pacifico', cursive;
            font-size: 2rem;
            color: var(--primary-pink);
            text-shadow: 0 0 10px var(--primary-pink);
            background: linear-gradient(to right, var(--primary-pink), var(--dark-pink));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .logo i {
            font-size: 1.8rem;
        }
        
        /* Search and Filter */
        .controls {
            display: flex;
            gap: 1rem;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .search-box {
            position: relative;
        }
        
        .search-box input {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--primary-pink);
            border-radius: 50px;
            padding: 0.5rem 1rem 0.5rem 2.5rem;
            color: var(--text-light);
            font-size: 0.9rem;
            width: 200px;
            transition: all 0.3s ease;
        }
        
        .search-box input:focus {
            outline: none;
            border-color: var(--dark-pink);
            box-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
            width: 250px;
        }
        
        .search-box i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary-pink);
        }
        
        .filter-dropdown {
            position: relative;
        }
        
        .filter-dropdown select {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid var(--primary-pink);
            border-radius: 50px;
            padding: 0.5rem 1.5rem 0.5rem 1rem;
            color: #000;
            font-size: 0.9rem;
            font-weight: 600;
            appearance: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .filter-dropdown select:focus {
            outline: none;
            border-color: var(--dark-pink);
            box-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
        }
        
        .filter-dropdown::after {
            content: '\f078';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary-pink);
            pointer-events: none;
        }
        
        /* Main Content */
        main {
            max-width: 1400px;
            margin: 2rem auto;
            padding: 0 2rem;
        }
        
        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
        }
        
    
        
        /* Hero Card */
        .hero-card {
            background: linear-gradient(135deg, rgba(42, 15, 42, 0.8) 0%, rgba(26, 10, 26, 0.9) 100%);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 105, 180, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            min-height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .hero-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary-pink);
            box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
        }
        
        .hero-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 105, 180, 0.1) 0%, transparent 70%);
            transform: rotate(30deg);
            pointer-events: none;
        }
        
        .hero-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(255, 105, 180, 0.2);
        }
        
        .hero-name {
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--primary-pink);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .hero-role {
            background: rgba(255, 105, 180, 0.2);
            color: var(--text-light);
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.8rem;
            font-weight: 600;
            border: 1px solid var(--primary-pink);
        }
        
        .hero-tier {
            font-weight: 700;
            font-size: 0.9rem;
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            text-transform: uppercase;
        }
        
        .tier-s { background: rgba(255, 215, 0, 0.2); color: gold; border: 1px solid gold; }
        .tier-a { background: rgba(255, 105, 180, 0.2); color: var(--primary-pink); border: 1px solid var(--primary-pink); }
        .tier-b { background: rgba(100, 149, 237, 0.2); color: cornflowerblue; border: 1px solid cornflowerblue; }
        .tier-c { background: rgba(144, 238, 144, 0.2); color: lightgreen; border: 1px solid lightgreen; }
        .tier-d { background: rgba(255, 165, 0, 0.2); color: orange; border: 1px solid orange; }
        
        /* Stats Bars */
        .stat-item {
            margin-bottom: 1rem;
        }
        
        .stat-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.3rem;
            font-size: 0.9rem;
            color: var(--text-dim);
        }
        
        .stat-value {
            font-weight: 600;
            color: var(--text-light);
        }
        
        .stat-bar-container {
            height: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            overflow: hidden;
        }
        
        .stat-bar {
            height: 100%;
            border-radius: 5px;
            background: linear-gradient(90deg, var(--primary-pink), var(--dark-pink));
            position: relative;
            transition: width 1.5s ease-out;
            width: 0;
        }
        
        .stat-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shine 2s infinite;
        }
        
        @keyframes shine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        
        /* Hero Image */
        .hero-image {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-pink);
            margin-right: 0.75rem;
            box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
        }
        
        /* KDA and Matches */
        .hero-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-top: 1.5rem;
            font-size: 0.9rem;
        }
        
        .detail-item {
            background: rgba(255, 255, 255, 0.05);
            padding: 0.5rem;
            border-radius: 8px;
            text-align: center;
        }
        
        .detail-label {
            color: var(--text-dim);
            margin-bottom: 0.3rem;
        }
        
        .detail-value {
            font-weight: 600;
            color: var(--text-light);
        }
        
        .kda-value {
            color: var(--primary-pink);
            font-weight: 700;
        }
        
        /* Loading Spinner */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(26, 10, 26, 0.9);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(5px);
        }
        
        .spinner {
            width: 70px;
            height: 70px;
            border: 5px solid rgba(255, 105, 180, 0.3);
            border-radius: 50%;
            border-top-color: var(--primary-pink);
            animation: spin 1s ease-in-out infinite;
            margin-bottom: 1.5rem;
        }
        
        .loading-text {
            font-family: 'Pacifico', cursive;
            color: var(--primary-pink);
            font-size: 1.5rem;
            text-shadow: 0 0 10px var(--primary-pink);
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* View Toggle */
        .view-toggle {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 1rem;
        }
        
        .toggle-btn {
            background: rgba(255, 105, 180, 0.2);
            border: 1px solid var(--primary-pink);
            color: var(--text-light);
            padding: 0.5rem 1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .toggle-btn:first-child {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        
        .toggle-btn:last-child {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
        
        .toggle-btn.active {
            background: var(--primary-pink);
            color: var(--bg-dark);
            font-weight: 600;
        }
        
        .toggle-btn:hover {
            background: rgba(255, 105, 180, 0.4);
        }
        
        /* Compact View */
        .compact-view .hero-card {
            padding: 1rem;
        }
        
        .compact-view .hero-header {
            margin-bottom: 0.5rem;
        }
        
        .compact-view .hero-name {
            font-size: 1.1rem;
        }
        
        .compact-view .hero-details {
            display: none;
        }
        
        .compact-view .stats-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1rem;
        }
        
        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
        }
        
        .tooltip .tooltip-text {
            visibility: hidden;
            width: 200px;
            background-color: var(--bg-light);
            color: var(--text-light);
            text-align: center;
            border-radius: 6px;
            padding: 0.5rem;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            border: 1px solid var(--primary-pink);
            box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
            font-size: 0.8rem;
        }
        
        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        /* Meta Pick Badge */
        .meta-badge {
            position: absolute;
            top: -10px;
            right: -10px;
            background: gold;
            color: var(--bg-dark);
            font-weight: bold;
            padding: 0.25rem 0.5rem;
            border-radius: 50px;
            font-size: 0.7rem;
            transform: rotate(15deg);
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
            z-index: 2;
        }
        
        /* Card Entrance Animation */
        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .hero-card {
            animation: fadeUp 0.5s ease-out forwards;
            opacity: 0;
        }
        
        /* Item Card Specific Styles */
        .item-card {
            background: linear-gradient(135deg, rgba(42, 15, 42, 0.8) 0%, rgba(26, 10, 26, 0.9) 100%);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 105, 180, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            animation: fadeUp 0.5s ease-out forwards;
            opacity: 0;
        }
        
        .item-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary-pink);
            box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
        }
        
        .item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .item-name {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-pink);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .item-image {
            width: 50px;
            height: 50px;
            border-radius: 8px;
            object-fit: cover;
            border: 2px solid var(--primary-pink);
            margin-right: 0.75rem;
            box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
        }
        
        .item-type {
            background: rgba(255, 20, 147, 0.2);
            color: var(--text-light);
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.8rem;
            font-weight: 600;
            border: 1px solid var(--dark-pink);
        }
        
        .item-price {
            font-weight: 700;
            color: gold;
        }
        
        .item-stats {
            margin-top: 1rem;
        }
        
        .item-stat {
            margin-bottom: 0.5rem;
            font-size: 0.9rem;
        }
        
        .stat-icon {
            margin-right: 0.3rem;
            color: var(--primary-pink);
        }
        
        .recommended-roles {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        
        .role-badge {
            background: rgba(255, 105, 180, 0.2);
            color: var(--text-light);
            padding: 0.25rem 0.5rem;
            border-radius: 50px;
            font-size: 0.7rem;
            border: 1px solid var(--primary-pink);
        }
        
        .no-items {
            grid-column: 1 / -1;
            text-align: center;
            padding: 2rem;
            color: var(--text-dim);
            font-size: 1.2rem;
        }
        
        /* Items Filter Controls */
        .items-filter-controls {
            display: flex;
            gap: 1rem;
            align-items: center;
            flex-wrap: wrap;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid rgba(255, 105, 180, 0.2);
        }
        
      
        
        /* Draft Maker Styles */
        .draft-container {
            padding: 1rem;
            background: rgba(42, 15, 42, 0.8);
            border-radius: 15px;
            border: 1px solid rgba(255, 105, 180, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .draft-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(255, 105, 180, 0.2);
        }

        .draft-phase-tracker {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .phase {
            background: rgba(255, 255, 255, 0.1);
            padding: 0.5rem 1rem;
            border-radius: 50px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .phase.active {
            background: var(--primary-pink);
            color: var(--bg-dark);
        }

        .draft-timer {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .timer-circle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 3px solid var(--primary-pink);
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            font-size: 1.2rem;
            animation: pulse 1s infinite alternate;
        }

        @keyframes pulse {
            from { box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.4); }
            to { box-shadow: 0 0 0 10px rgba(255, 105, 180, 0); }
        }

        .turn-indicator {
            font-weight: 600;
        }

        .team-selector {
            display: flex;
            gap: 0.5rem;
        }

        /* Rank Selector */
        .rank-selector {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            margin-left: auto;
        }

        .rank-selector label {
            font-size: 0.9rem;
            color: var(--text-dim);
        }

        /* AI Mode Toggle */
        .ai-mode-toggle {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .ai-mode-toggle label {
            font-size: 0.9rem;
            color: var(--text-dim);
        }

        /* Team Sides */
        .draft-main {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .team-side {
            background: linear-gradient(135deg, rgba(42, 15, 42, 0.8) 0%, rgba(26, 10, 26, 0.9) 100%);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 105, 180, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .blue-side {
            border-top: 5px solid var(--blue-team);
        }

        .red-side {
            border-top: 5px solid var(--red-team);
        }

        .team-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .team-score {
            font-weight: 600;
        }

        .blue-side .team-score {
            color: var(--blue-team);
        }

        .red-side .team-score {
            color: var(--red-team);
        }

        /* Selection Panels */
        .selection-panel {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            margin-bottom: 1rem;
            min-height: 80px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            padding: 0.5rem;
        }

        .selection-slot {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 5px;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            min-height: 60px;
        }

        .selection-slot:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .selection-slot.empty::after {
            content: '+';
            font-size: 1.5rem;
            color: rgba(255, 255, 255, 0.3);
        }

        .selection-slot .hero-image {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-pink);
        }

        .blue-selection .selection-slot.active {
            border: 2px dashed var(--blue-team);
        }

        .red-selection .selection-slot.active {
            border: 2px dashed var(--red-team);
        }

        /* Team Members */
        .team-members {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.5rem;
        }

        .team-member {
            display: grid;
            grid-template-columns: 50px 1fr auto;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
        }

        .blue-side .team-member {
            border-left: 3px solid var(--blue-team);
        }

        .red-side .team-member {
            border-left: 3px solid var(--red-team);
        }

        .team-member-role {
            font-size: 0.8rem;
            color: var(--text-dim);
        }

        /* Match Prediction */
        .match-prediction {
            background: linear-gradient(135deg, rgba(42, 15, 42, 0.8) 0%, rgba(26, 10, 26, 0.9) 100%);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 105, 180, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            width: 300px;
            margin-top: 1rem;
        }

        .win-probability {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 1rem 0;
        }

        .team-prob {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 40%;
        }

        .team-prob.blue {
            color: var(--blue-team);
        }

        .team-prob.red {
            color: var(--red-team);
        }

        .prob-bar {
            height: 10px;
            border-radius: 5px;
            margin-top: 0.5rem;
        }

        .team-prob.blue .prob-bar {
            background: linear-gradient(90deg, var(--blue-team), #2980b9);
        }

        .team-prob.red .prob-bar {
            background: linear-gradient(90deg, var(--red-team), #c0392b);
        }

        .vs-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-dark);
            border: 2px solid var(--primary-pink);
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
        }

        /* Suggestions Grid */
        .suggestions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .suggestion-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 0.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .suggestion-item:hover {
            background: rgba(255, 105, 180, 0.2);
            transform: translateY(-3px);
        }

        .suggestion-item .hero-image {
            width: 40px;
            height: 40px;
            margin-bottom: 0.3rem;
        }

        .suggestion-item .hero-name {
            font-size: 0.8rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .suggestion-item .win-rate {
            font-size: 0.7rem;
            color: var(--primary-pink);
            font-weight: bold;
        }

        /* Prediction Details */
        .prediction-section {
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(255, 105, 180, 0.1);
        }

        .prediction-section h4 {
            margin-bottom: 0.5rem;
            color: var(--primary-pink);
        }

        .analysis-row {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
        }

        .analysis-team {
            width: 48%;
        }

        .analysis-item {
            margin-bottom: 0.5rem;
        }

        .analysis-item label {
            display: block;
            font-size: 0.8rem;
            margin-bottom: 0.2rem;
        }

        .meter-bar {
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
        }

        .meter-bar span {
            display: block;
            height: 100%;
        }

        .blue .meter-bar span {
            background: linear-gradient(90deg, var(--blue-team), #2980b9);
        }

        .red .meter-bar span {
            background: linear-gradient(90deg, var(--red-team), #c0392b);
        }

        /* Team Selection Active States */
        .user-team {
            border-left: 5px solid var(--primary-pink);
            box-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
        }

        .enemy-team {
            opacity: 0.9;
        }

        .active-turn {
            animation: pulse-glow 2s infinite;
        }

        @keyframes pulse-glow {
            0% { box-shadow: 0 0 10px rgba(255, 105, 180, 0.3); }
            50% { box-shadow: 0 0 20px rgba(255, 105, 180, 0.6); }
            100% { box-shadow: 0 0 10px rgba(255, 105, 180, 0.3); }
        }

        /* Warning state */
        .warning {
            color: #ff4757;
            animation: blink 1s infinite;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Available Heroes */
        .available-heroes {
            margin-top: 1.5rem;
        }

        .available-heroes h3 {
            margin-bottom: 1rem;
            color: var(--primary-pink);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(255, 105, 180, 0.2);
        }

        /* Draft Controls */
        .draft-controls {
            display: flex;
            gap: 1rem;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 1.5rem;
        }

        /* Hero states in draft */
        .hero-card.banned {
            opacity: 0.5;
            filter: grayscale(80%);
            position: relative;
        }

        .hero-card.banned::after {
            content: 'BANNED';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(231, 76, 60, 0.8);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            font-weight: bold;
            z-index: 2;
        }

        .hero-card.picked {
            opacity: 0.7;
            position: relative;
        }

        .hero-card.picked::after {
            content: 'PICKED';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(52, 152, 219, 0.8);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            font-weight: bold;
            z-index: 2;
        }

        /* Undo button */
        .undo-btn {
            background: rgba(255, 105, 180, 0.2);
            border: 1px solid var(--primary-pink);
            color: var(--text-light);
            padding: 0.5rem 1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-left: auto;
        }

        .undo-btn:hover {
            background: rgba(255, 105, 180, 0.4);
        }

        /* Draft complete overlay */
        .draft-complete-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(26, 10, 26, 0.9);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            backdrop-filter: blur(5px);
        }

        .draft-complete-content {
            background: linear-gradient(135deg, rgba(42, 15, 42, 0.95) 0%, rgba(26, 10, 26, 0.98) 100%);
            border-radius: 15px;
            padding: 2rem;
            border: 1px solid var(--primary-pink);
            box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
            max-width: 600px;
            width: 90%;
            text-align: center;
        }

        .draft-complete-content h2 {
            color: var(--primary-pink);
            margin-bottom: 1.5rem;
            font-size: 2rem;
        }

        .draft-summary {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .draft-summary-team {
            padding: 1rem;
            border-radius: 10px;
        }

        .draft-summary-team.blue {
            border: 2px solid var(--blue-team);
        }

        .draft-summary-team.red {
            border: 2px solid var(--red-team);
        }

        .draft-summary-team h3 {
            margin-bottom: 1rem;
            color: var(--primary-pink);
        }

        .draft-summary-heroes {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.5rem;
        }

        .draft-summary-hero {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 5px;
        }

        .draft-summary-hero img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid var(--primary-pink);
        }

        .draft-complete-actions {
            display: flex;
            justify-content: center;
            gap: 1rem;
        }

        /* AI Difficulty Selector */
        .ai-difficulty {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-left: 1rem;
        }

        .ai-difficulty label {
            font-size: 0.9rem;
            color: var(--text-dim);
        }

        

       

       
#startDraftBtn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px auto;
    display: block;
    transition: background-color 0.3s;
}

#startDraftBtn:hover {
    background-color: #45a049;
}

#startDraftBtn i {
    margin-right: 8px;
}
/* Start Draft Button */
#startDraftBtn {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

#startDraftBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Mid Game Meter Bar (add if not existing) */
.meter-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 5px 0;
    position: relative;
}

.meter-bar {
    height: 20px;
    border-radius: 10px;
    position: relative;
    transition: width 0.5s ease;
}

.meter-bar.blue {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.meter-bar.red {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.meter-bar span {
    position: absolute;
    height: 100%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: auto;
}

.video-card {
  background: linear-gradient(135deg, rgba(42, 15, 42, 0.9), rgba(26, 10, 26, 0.95));
  border-radius: 15px;
  padding: 1rem;
  border: 1px solid rgba(255, 105, 180, 0.3);
  box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-pink);
  box-shadow: 0 10px 25px rgba(255, 105, 180, 0.5);
}

.video-card iframe {
  width: 100%;
  border-radius: 10px;
  border: none;
}

.video-title {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: var(--primary-pink);
  font-weight: bold;
}

.video-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #9c399c;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(60, 201, 90, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
}

/* Mobile-First Base Styles */
@media (max-width: 768px) {
  :root {
    font-size: 14px; /* Base font size adjustment */
  }

  body {
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
  }

  /* Header Adjustments */
  header {
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-content {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .logo {
    font-size: 1.5rem;
    justify-content: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 105, 180, 0.2);
  }

  .controls {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-box, 
  .filter-dropdown {
    width: 100%;
  }

  .search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
  }

  .search-box input:focus {
    width: 100%; /* Keep full width on focus */
  }

  /* Main Content */
  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Hero Cards */
  .hero-card {
    padding: 1rem;
    min-height: auto;
  }

  .hero-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero-name {
    font-size: 1.1rem;
  }

  .hero-role,
  .hero-tier {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  /* Hero Details */
  .hero-details {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* View Toggle */
  .view-toggle {
    justify-content: center;
  }

  /* Compact View Adjustments */
  .compact-view .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Draft Container */
  .draft-container {
    padding: 0.75rem;
  }

  .draft-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .draft-phase-tracker {
    justify-content: center;
    gap: 0.25rem;
  }

  .phase {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .draft-timer {
    justify-content: center;
    margin: 0.5rem 0;
  }

  .timer-circle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Team Sides */
  .draft-main {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-side {
    padding: 1rem;
  }

  /* Selection Panels */
  .selection-panel {
    grid-template-columns: repeat(2, 1fr);
    min-height: 60px;
  }

  /* Team Members */
  .team-member {
    grid-template-columns: 40px 1fr auto;
    gap: 0.3rem;
    padding: 0.3rem;
  }

  .team-member-role {
    font-size: 0.7rem;
  }

  /* Match Prediction */
  .match-prediction {
    width: 100%;
    padding: 1rem;
  }

  /* Video Grid */
  .video-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .video-card {
    padding: 0.75rem;
  }

  /* Buttons */
  #startDraftBtn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    margin: 0.75rem auto;
  }

  /* Form Elements */
  .filter-dropdown select {
    padding: 0.5rem 1.25rem 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Touch Target Sizes */
  button, 
  .toggle-btn,
  .phase,
  .selection-slot,
  .suggestion-item {
    min-height: 44px; /* Apple's recommended minimum touch target */
    min-width: 44px;
  }

  /* Performance Optimizations */
  .magic-star,
  .magic-bubble {
    display: none; /* Disable decorative elements on mobile */
  }

  /* Animations */
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Toast Notification */
  .toast-notification {
    width: 90%;
    text-align: center;
    padding: 0.75rem;
    bottom: 10px;
  }
}

/* Additional Small Screen Optimizations */
@media (max-width: 480px) {
  :root {
    font-size: 13px;
  }

  .hero-card {
    padding: 0.75rem;
  }

  .stat-item {
    margin-bottom: 0.75rem;
  }

  .stat-label,
  .stat-value {
    font-size: 0.8rem;
  }

  .detail-item {
    padding: 0.3rem;
  }

  .detail-label,
  .detail-value {
    font-size: 0.8rem;
  }

  /* Even more compact phase tracker */
  .draft-phase-tracker {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .phase {
    flex-shrink: 0;
  }

  /* Hide some less critical elements */
  .hero-image {
    width: 50px;
    height: 50px;
    margin-right: 0.5rem;
  }

  /* Selection panel adjustments */
  .selection-panel {
    grid-template-columns: 1fr;
  }

  /* Disable some hover effects */
  .hero-card:hover,
  .item-card:hover,
  .video-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }
}

/* Landscape Orientation Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-card {
    min-height: 220px; /* Ensure consistent height */
  }

  .draft-phase-tracker {
    justify-content: flex-start;
  }
}

/* Very Small Devices (e.g., iPhone 5/SE) */
@media (max-width: 320px) {
  :root {
    font-size: 12px;
  }

  .hero-name {
    font-size: 1rem;
  }

  .hero-role,
  .hero-tier {
    font-size: 0.7rem;
  }

  .stat-bar-container {
    height: 8px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--bg-dark);
    color: var(--text-light);
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-pink: #ff00ff;
    --dark-pink: #ff00aa;
    --text-light: #ffffff;
  }

  .hero-card,
  .item-card {
    border: 2px solid var(--primary-pink);
  }

  .stat-bar {
    background: var(--primary-pink);
  }
}