/* ===============================================
   AGENT ROULETTE CSS
   Valorant agent picker and team composition styles
   Dependencies: gaming-framework.css, main.css
   =============================================== */

/* ========== PAGE LAYOUT ========== */

/* Valorant-themed main content background - replaces inline styles */
.main-content--valorant-bg {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.98) 0%, rgba(15, 25, 20, 0.98) 50%, rgba(10, 10, 15, 0.98) 100%);
    min-height: 100vh;
}

.page-header {
    background: linear-gradient(135deg, #FF4655 0%, #FF6B7A 50%, #FF4655 100%);
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    padding: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
    transform: translateX(-2px);
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
}

.main-content {
    background: linear-gradient(135deg, #0F1419 0%, #1A1E23 25%, #0D1B2A 50%, #1B263B 75%, #0F1419 100%);
    min-height: calc(100vh - 40px);
    padding: 40px 0;
    position: relative;
}

.main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 122, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 69, 58, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(50, 215, 75, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ========== MODE SELECTION ========== */
.mode-selection {
    margin-bottom: 40px;
}

.mode-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.mode-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 280px;
    position: relative;
    overflow: hidden;
}

.mode-card:hover {
    border-color: #FF4655;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 70, 85, 0.2);
}

.mode-card.active {
    border-color: #FF4655;
    background: rgba(255, 70, 85, 0.1);
    box-shadow: 0 8px 25px rgba(255, 70, 85, 0.3);
}

.mode-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FF4655, transparent);
    animation: modeScan 2s ease-in-out infinite;
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.mode-card h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.mode-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* ========== ROULETTE SECTION ========== */
.roulette-section {
    margin-bottom: 40px;
}

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

.single-agent-mode {
    text-align: center;
}

.agent-wheel {
    margin-bottom: 30px;
}

.agent-display {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.agent-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: placeholderFloat 3s ease-in-out infinite;
}

.agent-text {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== AGENT CARDS ========== */
.agent-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.agent-card.spinning {
    animation: spinningCard 0.1s ease-in-out;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.agent-card.selected {
    border-color: #00FF7F;
    background: rgba(0, 255, 127, 0.08);
    box-shadow: 0 8px 30px rgba(0, 255, 127, 0.2);
}

.agent-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00FF7F, transparent);
    animation: selectedScan 3s ease-in-out infinite;
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF4655, #FF6B7A);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 70, 85, 0.4);
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Agent Avatar Images */
.agent-avatar[data-agent="jett"] { background-image: url('/assets/agents/Jett_icon.webp'); }
.agent-avatar[data-agent="reyna"] { background-image: url('/assets/agents/Reyna_icon.webp'); }
.agent-avatar[data-agent="raze"] { background-image: url('/assets/agents/Raze_icon.webp'); }
.agent-avatar[data-agent="phoenix"] { background-image: url('/assets/agents/Phoenix_icon.webp'); }
.agent-avatar[data-agent="yoru"] { background-image: url('/assets/agents/Yoru_icon.webp'); }
.agent-avatar[data-agent="neon"] { background-image: url('/assets/agents/Neon_icon.webp'); }
.agent-avatar[data-agent="iso"] { background-image: url('/assets/agents/Iso_icon.webp'); }
.agent-avatar[data-agent="omen"] { background-image: url('/assets/agents/Omen_icon.webp'); }
.agent-avatar[data-agent="brimstone"] { background-image: url('/assets/agents/Brimstone_icon.webp'); }
.agent-avatar[data-agent="astra"] { background-image: url('/assets/agents/Astra_icon.webp'); }
.agent-avatar[data-agent="viper"] { background-image: url('/assets/agents/Viper_icon.webp'); }
.agent-avatar[data-agent="harbor"] { background-image: url('/assets/agents/Harbor_icon.webp'); }
.agent-avatar[data-agent="clove"] { background-image: url('/assets/agents/Clove_icon.webp'); }
.agent-avatar[data-agent="sova"] { background-image: url('/assets/agents/Sova_icon.webp'); }
.agent-avatar[data-agent="breach"] { background-image: url('/assets/agents/Breach_icon.webp'); }
.agent-avatar[data-agent="skye"] { background-image: url('/assets/agents/Skye_icon.webp'); }
.agent-avatar[data-agent="kayo"] { background-image: url('/assets/agents/KAYO_icon.webp'); }
.agent-avatar[data-agent="fade"] { background-image: url('/assets/agents/Fade_icon.webp'); }
.agent-avatar[data-agent="gekko"] { background-image: url('/assets/agents/Gekko_icon.webp'); }
.agent-avatar[data-agent="sage"] { background-image: url('/assets/agents/Sage_icon.webp'); }
.agent-avatar[data-agent="cypher"] { background-image: url('/assets/agents/Cypher_icon.webp'); }
.agent-avatar[data-agent="killjoy"] { background-image: url('/assets/agents/Killjoy_icon.webp'); }
.agent-avatar[data-agent="chamber"] { background-image: url('/assets/agents/Chamber_icon.webp'); }
.agent-avatar[data-agent="deadlock"] { background-image: url('/assets/agents/Deadlock_icon.webp'); }
.agent-avatar[data-agent="vyse"] { background-image: url('/assets/agents/Vyse_icon.webp'); }

.agent-initial {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    display: none; /* Hidden when agent image is available */
}

.agent-info {
    text-align: center;
}

.agent-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.agent-role {
    font-size: 1rem;
    color: #FFD700;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agent-country {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ========== TEAM GRID ========== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    min-height: 200px;
    align-items: center;
}

.team-agent-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-agent-card:hover {
    border-color: #FF4655;
    box-shadow: 0 5px 20px rgba(255, 70, 85, 0.2);
}

.team-agent-card .agent-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.team-agent-card .agent-initial {
    font-size: 1.5rem;
}

.team-agent-card .agent-name {
    font-size: 1rem;
    margin-bottom: 8px;
}

.team-agent-card .agent-role {
    font-size: 1.2rem;
    margin: 0;
}

.team-loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* ========== CONTROLS ========== */
.roulette-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.roulette-btn {
    background: linear-gradient(135deg, #FF4655 0%, #FF6B7A 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.3);
    min-width: 200px;
}

.roulette-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 70, 85, 0.4);
}

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

.roulette-btn.secondary {
    background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.roulette-btn.secondary:hover {
    box-shadow: 0 6px 25px rgba(107, 114, 128, 0.4);
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* ========== AGENT INFO SECTION ========== */
.agent-info-section {
    margin-bottom: 40px;
}

.agent-details {
    max-width: 600px;
    margin: 0 auto;
}

.agent-detail-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.agent-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00FF7F, transparent);
    animation: detailScan 4s ease-in-out infinite;
}

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

.agent-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.agent-origin {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.agent-description {
    margin-bottom: 25px;
}

.agent-description p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

.agent-abilities, .agent-playstyle, .agent-tips {
    margin-bottom: 25px;
}

.agent-abilities h4, .agent-playstyle h4, .agent-tips h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFD700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.abilities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ability-tag {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.agent-playstyle p, .agent-tips p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
}

/* ========== SETTINGS SECTION ========== */
.settings-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.settings-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.setting-item label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF4655;
}

/* ========== FOOTER ========== */
.page-footer {
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.page-footer a {
    color: #FF4655;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-footer a:hover {
    color: #FF6B7A;
    text-decoration: underline;
}

/* ========== ANIMATIONS ========== */
@keyframes placeholderFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes spinningCard {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(5deg); }
}

@keyframes modeScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes selectedScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes detailScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

/* ========== SLOT MACHINE ANIMATIONS ========== */
.slot-machine {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
}

.slot-window {
    height: 200px;
    overflow: hidden;
    border: 3px solid var(--valorant-red);
    border-radius: 15px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 
        inset 0 0 20px rgba(255, 70, 85, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.slot-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 70, 85, 0.2) 0%,
        transparent 20%,
        transparent 80%,
        rgba(255, 70, 85, 0.2) 100%
    );
    pointer-events: none;
    z-index: 3;
}

.slot-reel {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.slot-agent-card {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    flex-shrink: 0;
}

.slot-agent-card .agent-avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.slot-agent-card .agent-name {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.slot-agent-card .agent-role {
    font-size: 0.8rem;
    opacity: 0.8;
    text-align: center;
}

/* Slot Spin Animation */
@keyframes slotSpin {
    0% {
        transform: translateY(0);
    }
    70% {
        transform: translateY(-3800px);
    }
    100% {
        transform: translateY(-3800px);
    }
}

/* Team slot specific animation - shorter distance */
@keyframes teamSlotSpin {
    0% {
        transform: translateY(0);
    }
    70% {
        transform: translateY(-2100px);
    }
    100% {
        transform: translateY(-2100px);
    }
}

/* Team Slot Machines */
.team-slot-machines {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 20px 0;
    justify-items: center;
}

.team-slot-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    margin: 0 auto;
}

.team-slot-machine .slot-window {
    height: 150px;
    width: 150px;
    border-width: 2px;
}

.team-slot-reel .slot-agent-card,
.team-slot-reel .team-card {
    height: 150px;
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
}

.team-slot-reel .agent-avatar {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 8px;
}

.team-slot-reel .agent-name {
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

.slot-position {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 600;
}

/* Slot Machine Sound Effects (Visual) */
.slot-window.spinning::after {
    content: '🎰';
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 1.5rem;
    animation: spin 0.5s linear infinite;
    z-index: 4;
}

/* Glow effect during spinning */
.slot-machine.active .slot-window {
    box-shadow: 
        inset 0 0 20px rgba(255, 70, 85, 0.5),
        0 0 30px rgba(255, 70, 85, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slotGlow 0.3s ease-in-out infinite alternate;
}

@keyframes slotGlow {
    0% {
        border-color: var(--valorant-red);
    }
    100% {
        border-color: var(--valorant-blue);
    }
}

/* Mobile responsive for slots */
@media (max-width: 768px) {
    .team-slot-machines {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        justify-content: center;
    }
    
    .team-slot-machine {
        width: 130px;
    }
    
    .team-slot-machine .slot-window {
        width: 130px;
        height: 130px;
    }
    
    .team-slot-machine:nth-child(4) {
        grid-column: 1 / 2;
        justify-self: end;
    }
    
    .team-slot-machine:nth-child(5) {
        grid-column: 3 / 4;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .team-slot-machines {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-slot-machine {
        width: 120px;
    }
    
    .team-slot-machine:nth-child(5) {
        grid-column: 1 / 3;
        justify-self: center;
    }
    
    .team-slot-machine .slot-window {
        height: 120px;
        width: 120px;
    }
    
    .team-slot-reel .slot-agent-card {
        height: 120px;
        padding: 8px;
        text-align: center;
    }
    
    .team-slot-reel .agent-avatar {
        width: 50px !important;
        height: 50px !important;
    }
    
    .team-slot-reel .agent-name {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .mode-cards {
        flex-direction: column;
        gap: 15px;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .agent-card {
        padding: 20px;
        margin: 0 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .roulette-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .roulette-btn {
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .team-agent-card {
        padding: 15px;
    }
    
    .team-agent-card .agent-avatar {
        width: 50px;
        height: 50px;
    }
    
    .agent-avatar {
        width: 70px;
        height: 70px;
    }
    
    .agent-initial {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .container {
        padding: 0 15px;
    }
}