/* Home Page Styles */

:root {
    --cast-bar-gap: 12px;
    --cast-max-members: 16;
}

/* General Layout */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Logged In User Section */
.user-welcome-section {
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
    display: flex;
    align-items: center;
    gap: 25px;
}

.user-avatar-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background-size: 110%;
    background-position: top;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.user-welcome-content {
    flex: 1;
}

.user-welcome-content h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
    font-weight: 700;
}

.user-welcome-content p {
    margin: 5px 0;
    font-size: 1.1em;
    opacity: 0.95;
}

/* Daily Spin Notification */
.daily-spin-notice {
    background-color: #4a9d7e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.daily-spin-notice .spin-text {
    font-size: 1.3em;
    font-weight: bold;
}

.daily-spin-notice .spin-text small {
    display: block;
    font-size: 0.7em;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 5px;
}

.spin-button {
    background: white;
    color: #4a9d7e;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
}

.spin-button:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}



/* Current Game Section */
.current-game-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.current-game-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-type-badge {
    background: #5a6c8f;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.6em;
    font-weight: 600;
}

/* Cast Bar */
.cast-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--cast-bar-gap);
    margin-bottom: 20px;
    overflow-x: auto;
}

.cast-member {
    /* 100% / 16 members - gap compensation */
    flex: 0 0 calc(6.25% - var(--cast-bar-gap) + (var(--cast-bar-gap) / var(--cast-max-members)));
    min-width: 80px;
    text-align: center;
}

.cast-member-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background-size: cover;
    background-position: top;
    border: 2px solid #e0e0e0;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cast-member-avatar:hover {
    border-color: #5a6c8f;
}

.cast-member-avatar.evicted {
    opacity: 0.5;
    filter: grayscale(100%);
}

.cast-member-name {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    margin: 5px 0;
    text-decoration: none;
    display: block;
}

.cast-member-name:hover {
    color: #5a6c8f;
}

.cast-member-status {
    font-size: 0.7em;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
    display: inline-block;
}

.cast-member-status.hoh {
    background: #d4a574;
    color: white;
}

.cast-member-status.nom {
    background: #c77383;
    color: white;
}

.cast-member-status.safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.game-action-button {
    background: #5a6c8f;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
}

.game-action-button:hover {
    background: #4a5c7f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* User Games Grid */
.user-games-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-games-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.8em;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.game-card {
    border-radius: 8px;
    padding: 20px;
    color: white;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: block;
}

.game-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.game-card-title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
}

.game-card-status {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.game-card-info {
    margin: 10px 0;
}

.game-card-info p {
    margin: 5px 0;
    font-size: 0.95em;
}

/* Logged Out Landing Page */
.landing-hero {
    background: #5a6c8f;
    border-radius: 8px;
    padding: 80px 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
}

.landing-hero h1 {
    font-size: 3em;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.landing-hero p {
    font-size: 1.5em;
    margin: 0 0 40px 0;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    background: white;
    color: #5a6c8f;
    border: none;
    padding: 14px 40px;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: white;
    color: #5a6c8f;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    color: #333;
}

.feature-card p {
    margin: 0;
    color: #666;
    font-size: 1em;
    line-height: 1.6;
}

/* Bottom CTA specific styling */
.landing-hero.bottom-cta {
    padding: 60px 40px;
}

.landing-hero.bottom-cta h1 {
    font-size: 2.5em;
}

.landing-hero.bottom-cta p {
    font-size: 1.2em;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-welcome-section {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar-display {
        width: 100px;
        height: 100px;
    }
    
    .user-welcome-content h1 {
        font-size: 1.5em;
    }
    
    .landing-hero h1 {
        font-size: 2.5em;
    }
    
    .landing-hero p {
        font-size: 1.2em;
    }
    
    .cast-bar {
        flex-wrap: wrap;
    }
    
    .cast-member {
        /* 25% (4 per row) - gap compensation */
        flex: 0 0 calc(25% - var(--cast-bar-gap) + (var(--cast-bar-gap) / 4));
        min-width: 70px;
    }
    
    .daily-spin-notice {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    

}

@media (max-width: 480px) {
    .landing-hero {
        padding: 40px 20px;
    }
    
    .landing-hero h1 {
        font-size: 2em;
    }
    
    .cast-bar {
        flex-wrap: wrap;
    }
    
    .cast-member {
        /* 33.33% (3 per row) - gap compensation */
        flex: 0 0 calc(33.33% - var(--cast-bar-gap) + (var(--cast-bar-gap) / 3));
        min-width: 60px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
    }
}

/* No Games Message */
.no-games-message {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-games-message p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.no-current-game {
    text-align: center;
    padding: 30px;
    color: #999;
    background: #f5f5f5;
    border-radius: 8px;
}

.no-current-game p {
    font-size: 1.1em;
    margin: 0;
}
