/* Reset et variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #009FF8;
    --primary-dark: #0088d4;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #F9F2E1;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-short: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #ececec;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-primary);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
}

/* Header */
.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.flags {
    grid-column: 3;
    justify-self: end;
    position: relative;
}

#flagBtn {
    padding: 0.4em;
    border: none;
    border-radius: 50%;
    display: flex;
    cursor: pointer;
    background-color: transparent;
    gap: 0.4em;
    align-items: center;
    transition: var(--transition-short);
}

.flags img {
    width: 36px;
}

.other-langs {
    display: none;
    padding: 0.2rem;
    position: absolute;
    width: 100%;
}

.other-langs a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.other-langs a {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    padding: 0.4rem;
    transition: var(--transition-short);
}

.flags:hover #flagBtn{
    background-color: rgba(0, 0, 0, 0.05);
}

.flags:hover .other-langs,
#flagBtn:focus + .other-langs {
    display: block;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: 1rem;
    padding: 0.5rem;
}

/* Error */
.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.error i {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.error p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Profile Banner */
.profile-banner {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

/* Profile Info */
.profile-info {
    padding: 1.5rem;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.avatar-section {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    background-color: white;
}

.username-container {
    display: flex;
    align-items: center;
}

.username {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.premium-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-left: 0.5rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}


/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}


/* Friend Code */
.friend-code-section {
    margin-bottom: 1.5rem;
}

.friend-code-section label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.friend-code {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.friend-code span {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.copy-btn {
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary-dark);
}

/* Album Section */
.album-section {
    margin-bottom: 1rem;
    text-align: center;
}

.album-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 16px;
    background: #009FF8;
    color: white;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.album-btn:hover {
    background: #0088d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.album-btn:disabled {
    filter: saturate(0);
    cursor: not-allowed;
    box-shadow: none;
}

.album-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}



/* CTA Section */
.cta-section {
    background: var(--bg-secondary);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.cta-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--text-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 140px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-btn i {
    font-size: 1.5rem;
}

.download-btn div {
    text-align: left;
}

.download-btn div span {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

.download-btn div strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1000;
    cursor: pointer;
}

.toast.error {
    background-color: #dc3545;
}

.toast.success {
    background-color: #28a745;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 1rem;
    }
    
    .profile-info {
        padding: 1rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .stats-grid {
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .download-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .download-btn {
        flex: 1;
        min-width: 140px;
        max-width: 180px;
    }
    
    .cta-section {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
}
