:root {
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-color: #f0f9ff;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Animated background pattern */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

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

/* Header with gradient */
header {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "♪ ♫ ♪";
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
}

header::after {
    content: "♫ ♪ ♫";
    position: absolute;
    bottom: 10px;
    left: 20px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    padding: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding: 0;
}

/* Navigation with vibrant styling */
nav {
    margin-top: 20px;
    width: 100%;
}

nav>ul {
    justify-content: center;
    gap: 15px;
    padding: 0;
    margin: 0;
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

nav>ul>li {
    padding: 0;
    border: none;
}

nav>ul>li>a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

nav>ul>li>a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Card with vibrant accent */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    border-top: 4px solid var(--accent-color);
    position: relative;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--accent-color));
    border-radius: 16px 16px 0 0;
}

.centre {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.resp-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
}

h2,
h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
}

h3 {
    font-size: 1.75rem;
    padding-bottom: 15px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color)) 1;
    color: var(--primary-color);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

/* Vibrant Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary::before {
    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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Intro Section */
#intro {
    max-width: 700px;
    margin: 0 auto;
}

#intro p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

#demoAudio {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
    border-radius: 50px;
}

/* Tunes Section with vibrant styling */
#tunes {
    display: none;
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid var(--primary-light);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

#tunes h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 30px;
    border: none;
}

#playPause {
    width: 140px;
    height: 140px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
    border: 4px solid var(--primary-light);
}

#playPause:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.4);
}

/* End Section with vibrant layout */
#end {
    display: none;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 768px) {
    #end {
        flex-direction: row;
        align-items: flex-start;
    }
}

#chartContainer {
    flex: 1;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
    border-top: 3px solid var(--accent-color);
}

#chartContainer h3 {
    color: var(--primary-color);
}

#chart {
    width: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
}

#feedbackContainer {
    flex: 1;
    text-align: left;
}

#feedbackContainer h3 {
    color: var(--primary-color);
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color)) 1;
}

#listFeedback {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

#listFeedback li {
    margin-bottom: 15px;
}

#listFeedback li a {
    display: block;
    padding: 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

#listFeedback li a:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-left-color: var(--accent-color);
    padding-left: 25px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

#feedback h2 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
}

#feedback h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    margin-top: 20px;
    font-weight: 700;
}

#feedback p {
    color: var(--text-main);
    margin-top: 0;
    line-height: 1.7;
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Dialog styling */
dialog {
    border: none;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
    max-width: 400px;
    width: 90%;
    color: var(--text-main);
    border-top: 4px solid var(--accent-color);
}

dialog::backdrop {
    background: rgba(14, 165, 233, 0.3);
    backdrop-filter: blur(4px);
}

dialog h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: none;
    margin-bottom: 15px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 60px;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary-light), transparent) 1;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px 15px;
    }

    header {
        padding: 20px 15px;
        border-radius: 12px;
    }

    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1rem;
    }

    .card {
        padding: 25px;
    }

    #tunes {
        padding: 25px;
    }

    #playPause {
        width: 120px;
        height: 120px;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}