/* =====================================================
   TUNEUM - Stylesheet Centralisé
   ===================================================== */

:root {
    --primary: #00d4ff;
    --secondary: #9d4edd;
    --accent: #ff006e;
    --dark: #0a0e27;
    --darker: #050816;
    --light: #f0f4f8;
    --success: #4CAF50;
    --warning: #ff9800;
    --error: #f44336;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1a3e 100%);
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 110, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* =====================================================
   NAVIGATION
   ===================================================== */

nav {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-list > li {
    position: relative;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 20px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
    border-bottom-color: var(--primary);
}

.nav-item i {
    font-size: 1.1rem;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    list-style: none;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding-left: 25px;
}

.user-balance {
    margin-left: auto;
    padding: 18px 20px;
    font-weight: bold;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn, .add-audio-button {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    z-index: 2;
}

.btn-primary, .add-audio-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover, .add-audio-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
}

button:disabled, .add-audio-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   CONTAINERS & SECTIONS
   ===================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(0, 212, 255, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card h2, .card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--light);
    margin-bottom: 20px;
}

/* =====================================================
   FORMS
   ===================================================== */

.form-container {
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.form-container h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

label {
    display: block;
    color: var(--light);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: rgba(240, 244, 248, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    color: var(--light);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(240, 244, 248, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

/* =====================================================
   MESSAGES
   ===================================================== */

.success-message, .error-message, .info-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.error-message, .error-text {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
}

.info-message {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
}

/* =====================================================
   TESTNET WARNING
   ===================================================== */

.testnet-warning {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(157, 78, 221, 0.2));
    border: 2px solid var(--accent);
    padding: 10px 20px;
    text-align: center;
    font-weight: bold;
    color: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

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

/* =====================================================
   LOADER
   ===================================================== */

.loader {
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   PROGRESS STEPS
   ===================================================== */

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 212, 255, 0.2);
    z-index: -1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--light);
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
}

.step-label {
    font-size: 0.9rem;
    color: rgba(240, 244, 248, 0.7);
    text-align: center;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* =====================================================
   GRID LAYOUTS
   ===================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    background: rgba(10, 14, 39, 0.8);
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    padding: 40px 20px;
    text-align: center;
    margin-top: 100px;
}

footer p {
    color: rgba(240, 244, 248, 0.6);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary);
}

/* =====================================================
   UTILITIES
   ===================================================== */

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

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

.mb-20 {
    margin-bottom: 20px;
}

.gap-15 {
    gap: 15px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-item {
        justify-content: flex-start;
    }
    
    .user-balance {
        margin-left: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(0, 212, 255, 0.2);
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        max-height: 500px;
    }
    
    .form-container, .card {
        padding: 25px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 30px;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}
