/* Estilos gerais */
:root {
    --discord-color: #5865F2;
    --discord-dark: #4752C4;
    --steam-color: #1b2838;
    --steam-accent: #66c0f4;
    --success-color: #2196F3;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --background: #0d1421;
    --foreground: #1a2332;
    --card-bg: #243447;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
    --border-color: #3a4a5c;
    --accent-color: #2196F3;
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom, #2c3e50 0%, #1a252f 50%, #0d1117 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Starfield Animation */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    transform: rotate(-45deg);
    z-index: -1;
}

.stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: zoom 20s infinite linear;
    opacity: 0.5;
}

.stars2 {
    background-image: 
        radial-gradient(1px 1px at 40px 60px, #fff, transparent),
        radial-gradient(1px 1px at 120px 10px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 170px 50px, #eee, transparent);
    background-repeat: repeat;
    background-size: 250px 120px;
    animation: zoom 40s infinite linear;
    opacity: 0.4;
}

.stars3 {
    background-image: 
        radial-gradient(1px 1px at 60px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 100px 20px, #fff, transparent),
        radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 300px 150px;
    animation: zoom 60s infinite linear;
    opacity: 0.3;
}

@keyframes zoom {
    from {
        transform: rotate(-45deg) scale(0);
    }
    to {
        transform: rotate(-45deg) scale(1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Mensagens */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
}

.message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.success {
    background-color: rgba(67, 181, 129, 0.2);
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: rgba(240, 71, 71, 0.2);
    border-left: 4px solid var(--error-color);
}

.warning {
    background-color: rgba(250, 166, 26, 0.2);
    border-left: 4px solid var(--warning-color);
}

/* Container de autenticação */
.auth-container {
    margin-bottom: 2rem;
}

.auth-box {
    background: rgba(36, 52, 71, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.auth-box h2 {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.8rem;
}

.instructions {
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-muted);
}

/* Serviços de autenticação */
.auth-services {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.auth-service {
    flex: 1;
    min-width: 280px;
    background: rgba(26, 35, 50, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-service:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.4), 0 0 0 1px rgba(33, 150, 243, 0.2);
    background: rgba(26, 35, 50, 0.8);
}

.auth-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.service-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.auth-service h3 {
    font-size: 1.4rem;
}

.auth-description {
    text-align: center;
}

.auth-button {
    display: inline-block;
    padding: 14px 28px;
    margin-top: 1.5rem;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-button:hover::before {
    width: 300px;
    height: 300px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.auth-button i {
    margin-right: 8px;
}

.discord {
    background-color: var(--discord-color);
}

.discord:hover {
    background-color: var(--discord-dark);
}

.steam {
    background-color: var(--steam-color);
}

.steam:hover {
    background-color: #000;
}

.complete {
    background-color: var(--success-color);
}

.complete:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* Serviço autenticado */
.auth-service.authenticated {
    background: rgba(33, 150, 243, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(33, 150, 243, 0.5);
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3), inset 0 0 20px rgba(33, 150, 243, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3), inset 0 0 20px rgba(33, 150, 243, 0.1); }
    50% { box-shadow: 0 8px 32px rgba(33, 150, 243, 0.5), inset 0 0 20px rgba(33, 150, 243, 0.2); }
}

.auth-info {
    text-align: center;
    padding: 1rem 0;
    position: relative;
}

.disconnect-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.2s;
}

.disconnect-btn:hover {
    background-color: #d63031;
    transform: scale(1.1);
}

.username-large {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status.connected {
    background-color: var(--success-color);
    color: white;
    font-weight: 500;
}

/* Final step */
.final-step {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.15) 0%, rgba(33, 150, 243, 0.15) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(67, 181, 129, 0.4);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1.5rem;
    box-shadow: 0 8px 32px rgba(67, 181, 129, 0.2), inset 0 0 20px rgba(67, 181, 129, 0.1);
    animation: successGlow 3s ease-in-out infinite;
}

@keyframes successGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(67, 181, 129, 0.2), inset 0 0 20px rgba(67, 181, 129, 0.1); }
    50% { box-shadow: 0 8px 32px rgba(67, 181, 129, 0.4), inset 0 0 20px rgba(67, 181, 129, 0.2); }
}

.final-step h3 {
    margin-bottom: 1rem;
    color: var(--success-color);
}

.partial {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(250, 166, 26, 0.1);
    border-radius: var(--border-radius);
}

/* Auth footer */
.auth-footer {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.privacy-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.discord-link a {
    color: var(--discord-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.discord-link i {
    margin-right: 5px;
}

/* Success page */
.success-page {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.success-page h1 {
    margin-bottom: 2rem;
}

.account-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.linked-account {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-width: 200px;
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.link-icon {
    font-size: 2rem;
    color: var(--success-color);
}

.success-message {
    margin-bottom: 2rem;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.primary {
    background-color: var(--success-color);
    color: white;
}

.primary:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.secondary {
    background-color: #4f545c;
    color: white;
}

.secondary:hover {
    background-color: #36393f;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem;
    }
    
    .auth-services {
        flex-direction: column;
        gap: 1rem;
    }
    
    .auth-service {
        min-width: 100%;
        padding: 1rem;
    }
    
    .logo {
        max-width: 150px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .account-info {
        flex-direction: column;
    }
    
    .link-icon {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .auth-box {
        padding: 1rem;
    }
    
    .auth-service {
        padding: 0.75rem;
    }
    
    .logo {
        max-width: 120px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .auth-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
