/* Reset di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #ffd700;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.hero-icon i {
    color: #dc3545 !important;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
    color: #ff8c00;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-weight: 500;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
    margin-top: -50px;
    z-index: 10;
}

/* Navigation Bar */
.navigation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #8b4513, #d2691e);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
    margin-bottom: 40px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-brand i {
    font-size: 2rem;
    color: #ffd700;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-btn.btn-primary:hover { border-color: #007bff; }
.nav-btn.btn-success:hover { border-color: #28a745; }
.nav-btn.btn-info:hover { border-color: #17a2b8; }
.nav-btn.btn-danger:hover { border-color: #dc3545; }

/* Main Navigation */
.main-nav {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: 2px solid #ffd700;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Navigation Links - Base Style */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: white;
    min-width: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* HOME SITO - Stile Rosso Elegante */
.nav-link:nth-child(1) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.nav-link:nth-child(1):hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
    border-color: #fbbf24;
}

.nav-link:nth-child(1)::before {
    content: '🏠';
    margin-right: 8px;
    font-size: 1.1em;
}

/* AUDIO - Stile Arancione Vibrante */
.nav-link:nth-child(2) {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4);
}

.nav-link:nth-child(2):hover {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.6);
    border-color: #fbbf24;
}

.nav-link:nth-child(2)::before {
    content: '🎵';
    margin-right: 8px;
    font-size: 1.1em;
}

/* LOGIN - Stile Verde Moderno */
.nav-link:nth-child(3) {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

.nav-link:nth-child(3):hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.6);
    border-color: #fbbf24;
}

.nav-link:nth-child(3)::before {
    content: '🔐';
    margin-right: 8px;
    font-size: 1.1em;
}

/* Effetto Shimmer per tutti i pulsanti */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.nav-link:hover::after {
    left: 100%;
}

.nav-link:hover {
    color: white;
    text-decoration: none;
}



.nav-link i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

/* Upload Section */
.upload-section {
    margin: 40px 0;
}

.upload-card, .auth-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.upload-card::before, .auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.upload-icon, .auth-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffd700;
    position: relative;
    z-index: 2;
}

.upload-card h3, .auth-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.upload-card p, .auth-card p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.btn-upload, .btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.btn-upload:hover, .btn-auth:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1, h2, h3, h4, h5, h6 {
    color: #8b4513; /* Marrone caldo per titoli */
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    text-align: center;
}

.alert-success {
    background-color: #e6f7d9; /* Verde chiaro */
    color: #3c763d;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da; /* Rosso chiaro */
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1e7dd; /* Blu-verde chiaro */
    color: #0c5460;
    border: 1px solid #b8daff;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.btn-primary {
    background-color: #8b4513; /* Marrone caldo */
    color: #fff;
    border: 1px solid #8b4513;
}

.btn-primary:hover {
    background-color: #654321; /* Marrone più scuro */
    transform: scale(1.05);
}

.btn-danger {
    background-color: #dc3545; /* Rosso acceso */
    color: #fff;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #bd2130;
    transform: scale(1.05);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.card {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fffef0; /* Sfondo leggermente giallastro */
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #8b4513; /* Marrone caldo */
    font-weight: bold;
}

.card-text {
    font-size: 1rem;
    color: #555;
}

audio {
    width: 100%;
    margin-top: 1rem;
    border-radius: 5px;
    background-color: #f8f9fa;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #ddd;
    text-align: center;
}

.table thead th {
    background-color: #8b4513; /* Marrone caldo */
    color: #fff;
    font-weight: bold;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa; /* Grigio chiaro */
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 5px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #8b4513;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25); /* Ombra marrone */
}

textarea.form-control {
    height: auto;
}

/* Stili per dispositivi mobili */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .card {
        margin-bottom: 15px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    audio {
        width: 100%;
    }
}

/* Miglioramenti per l'aspetto app-like */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:active {
    transform: scale(0.98);
}

.btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: none;
}

audio {
    border-radius: 25px;
    width: 100%;
    height: 40px;
}

/* Stile Jukebox retrò ma leggibile */
body {
    background: linear-gradient(45deg, #2d2d2d, #3d3d3d);
    color: #333;
    font-family: 'Helvetica Neue', sans-serif;
}

.container {
    background: #f5f5f5;
    border-radius: 15px;
    border: 3px solid #8b4513;
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.3);
    padding: 30px;
    margin-top: 20px;
}

h1 {
    color: #8b4513;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

/* Audio List Section */
.audio-list-section {
    margin: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b4513;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title i {
    color: #dc3545 !important;
    margin-right: 10px;
    font-size: 2rem;
    font-weight: bold;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #8b4513, #d2691e);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.audio-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.1);
    position: relative;
    overflow: hidden;
}

.audio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #8b4513, #d2691e);
}

.audio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.audio-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.audio-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b4513, #d2691e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.audio-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #8b4513;
    margin: 0;
    flex: 1;
}

.audio-phrase {
    font-size: 1.1rem;
    font-style: italic;
    color: #d2691e;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(139, 69, 19, 0.05);
    border-radius: 10px;
    border-left: 4px solid #d2691e;
}

.audio-explanation {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.audio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.audio-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b4513;
    font-weight: 500;
}

.audio-author i {
    color: #d2691e;
}

.card {
    background: #fff;
    border: 2px solid #8b4513;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(139, 69, 19, 0.3);
}

.card-body {
    padding: 20px;
}

.card-title {
    color: #8b4513;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.card-text {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
}

.text-muted {
    color: #666 !important;
}

/* Custom Audio Player */
.custom-audio-player {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 25px;
    color: white;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 80px;
}

.custom-audio-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0.05) 100%);
    pointer-events: none;
}

/* Stili specifici per il pulsante play nel file index.php */
.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 4px solid #fff;
    color: #2c3e50;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255,215,0,0.5);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.play-btn:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    transform: scale(1.2);
    box-shadow: 0 8px 30px rgba(255,215,0,0.7);
    border-color: #fff;
}

.play-btn.playing {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 6px 20px rgba(255,215,0,0.5); }
    50% { box-shadow: 0 8px 30px rgba(255,215,0,0.8), 0 0 0 10px rgba(255,215,0,0.1); }
    100% { box-shadow: 0 6px 20px rgba(255,215,0,0.5); }
}

/* Audio Info Section */
.audio-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.audio-title-small {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.audio-duration {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
    border: 1px solid rgba(255,215,0,0.2);
}

/* Audio Controls Section */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.audio-controls .volume-slider {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-controls .volume-slider:hover {
    background: rgba(255, 255, 255, 0.4);
}

.audio-controls .volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.audio-controls .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(255,215,0,0.5);
}

.audio-controls .volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.audio-controls i {
    color: #ffd700;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.audio-controls i:hover {
    color: #ffed4e;
    transform: scale(1.1);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.play-pause-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 3px solid #fff;
    color: #2c3e50;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255,215,0,0.4);
    position: relative;
    z-index: 2;
}

.play-pause-btn:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(255,215,0,0.6);
}

.time-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-left: auto;
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,215,0,0.3);
}

.progress-container {
    flex: 1;
    margin: 0 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Stile personalizzato per il player audio nativo (fallback) */
audio {
    width: 100%;
    height: 40px;
    margin-top: 15px;
    border: 2px solid #8b4513;
    border-radius: 25px;
    background: #f8f8f8;
}

.btn-primary {
    background: #8b4513;
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #654321;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.3);
    transform: scale(1.05);
}

/* Form styling */
.form-control {
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 10px 15px;
    color: #333;
    background: #fff;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
    border-color: #8b4513;
}

/* Alert styling */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Effetto decorativo retrò */
.container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #8b4513;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 50%, #cd853f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b4513, #d2691e);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* Responsive design */
@media (max-width: 1200px) {
    .audio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
        margin: 10px;
        margin-top: -30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .navigation-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .nav-links {
        justify-content: center;
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .audio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .audio-card {
        padding: 20px;
    }
    
    .upload-card, .auth-card {
        padding: 30px 20px;
    }
    
    .player-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .progress-container {
        order: 3;
        flex-basis: 100%;
        margin: 10px 0;
    }
    
    .volume-container {
        display: none;
    }
    
    /* Responsive per il nuovo player audio */
    .custom-audio-player {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        min-height: auto;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        align-self: center;
    }
    
    .audio-info {
        text-align: center;
        order: 2;
    }
    
    .audio-controls {
        order: 3;
        justify-content: center;
    }
    
    .audio-controls .volume-slider {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 8px;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 70px;
        flex: 1;
        max-width: 90px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .audio-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Player audio per schermi molto piccoli */
    .custom-audio-player {
        padding: 15px;
        gap: 12px;
    }
    
    .play-btn {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
    
    .audio-title-small {
        font-size: 1rem;
    }
    
    .audio-duration {
        font-size: 0.8rem;
    }
    
    .audio-controls .volume-slider {
        width: 60px;
    }
    
    .audio-controls i {
        font-size: 1rem;
    }
}

/* AOS Animation Overrides */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b4513, #d2691e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d2691e, #8b4513);
}

/* Request Form Styles */
.request-form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.form-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid #ffd700;
}

.form-header {
    background: linear-gradient(135deg, #8b4513, #d2691e);
    color: white;
    padding: 30px;
    text-align: center;
}

.form-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.form-body {
    padding: 40px;
    background: #f8f9fa;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-label i {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: bold;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 500;
}

.btn-submit {
    background: linear-gradient(135deg, #8b4513, #d2691e);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px auto 0;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, #d2691e, #8b4513);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Success Section */
.success-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.success-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid #28a745;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.success-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.success-message {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.success-subtitle {
    font-size: 1rem;
    color: #8b4513;
    font-weight: 600;
    margin-bottom: 30px;
}

.success-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-modern.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-modern.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Alert Modern */
.alert-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-modern.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.alert-modern i {
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-body {
        padding: 30px 20px;
    }
    
    .success-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-modern {
        width: 100%;
        justify-content: center;
    }
}