:root {
    --primary-color: #9c27b0;
    --secondary-color: #673ab7;
    --accent-color: #2196f3;
    --text-color: #2c3e50;
    --light-text: #ecf0f1;
    --background: #f9f9f9;
    --card-bg: #ffffff;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --karaoke-highlight: #e91e63;
    --karaoke-bg: rgba(25, 25, 25, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Particles Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

/* Header Styles */
header {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--light-text);
}

.pulse {
    animation: pulse 2s infinite;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

h1 span {
    color: var(--accent-color);
    font-weight: 700;
    font-family: 'Dancing Script', cursive;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 0.5rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInUp 1s ease;
}

/* Cards */
.search-card, .results-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

.search-card:hover, .results-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    background-color: #f0f0f0;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

input::placeholder {
    color: #999;
}

button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

button:active {
    transform: translateY(0);
}

/* Results Section */
.results-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: var(--error-color);
}

.error-icon {
    font-size: 3rem;
}

#lyrics-result {
    width: 100%;
}

.lyrics-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    flex-wrap: wrap;
}

.lyrics-header i {
    font-size: 1.5rem;
}

.lyrics-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    flex-grow: 1;
}

.mode-toggle {
    display: flex;
    gap: 0.5rem;
}

.mode-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: #f0f0f0;
    color: var(--text-color);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

#normal-view {
    width: 100%;
}

#lyrics-content {
    white-space: pre-wrap;
    line-height: 1.8;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: #f9f9f9;
    border-left: 4px solid var(--accent-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    width: 100%;
    overflow-x: auto;
}

/* Karaoke Mode Styling */
#karaoke-view {
    width: 100%;
    padding: 2rem;
    background: linear-gradient(rgba(20, 20, 35, 0.95), rgba(40, 10, 60, 0.9));
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#karaoke-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
}

.karaoke-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    padding: 1.2rem;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    flex-wrap: wrap;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.control-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0) scale(0.98);
}

.control-btn i {
    font-size: 1.2rem;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-control label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

#speed-slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--accent-color) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-radius: 3px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    transition: all 0.2s ease;
}

#speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

#speed-value {
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    color: white;
}

.karaoke-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.karaoke-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    height: 10px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
}

.previous-line, .next-line {
    opacity: 0.6;
    font-size: 1.1rem;
    margin: 1.2rem 0;
    text-align: center;
    transition: all 0.5s ease;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-weight: 300;
    padding: 0 1rem;
    max-width: 90%;
}

.current-line {
    font-size: 2rem;
    font-weight: 600;
    margin: 2rem 0;
    text-align: center;
    line-height: 1.5;
    min-height: 3rem;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 0 1rem;
    max-width: 90%;
}

.current-line::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.highlight {
    color: var(--karaoke-highlight);
    position: relative;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--karaoke-highlight);
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.7);
    animation: pulse 1s infinite;
    border-radius: 2px;
}

.rest {
    color: white;
}

@keyframes colorPulse {
    0% {
        text-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(233, 30, 99, 0.8);
    }
    100% {
        text-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
    }
}

/* Adding this to make highlighted words pulse with color */
.highlight {
    animation: colorPulse 2s infinite;
}

/* Footer */
footer {
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
    animation: fadeIn 1s ease;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.social-icon {
    color: var(--light-text);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

footer a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.copyright {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

/* Helper Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Media Queries */
@media (min-width: 768px) {
    .input-group {
        flex-direction: row;
    }
    
    .lyrics-header {
        flex-wrap: nowrap;
    }
}

@media (max-width: 768px) {
    .search-card, .results-card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .current-line {
        font-size: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .karaoke-controls {
        padding: 1rem;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .speed-control {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .current-line {
        font-size: 1.2rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    .speed-control {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Visualizer and Equalizer */
.visualizer-container {
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    height: 60px;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 60px;
    width: 80px;
}

.equalizer .bar {
    background: linear-gradient(to top, var(--primary-color), var(--karaoke-highlight));
    width: 8px;
    height: 30%;
    border-radius: 10px 10px 0 0;
    animation: equalize 1.5s ease-in-out infinite;
}

.equalizer .bar:nth-child(1) {
    animation-delay: 0.2s;
}

.equalizer .bar:nth-child(2) {
    animation-delay: 0.4s;
}

.equalizer .bar:nth-child(3) {
    animation-delay: 0.1s;
}

.equalizer .bar:nth-child(4) {
    animation-delay: 0.3s;
}

.equalizer .bar:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes equalize {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 80%;
    }
}

/* Karaoke Controls */
.main-controls {
    display: flex;
    gap: 0.8rem;
}

/* Progress Bar */
.progress-bar-container {
    margin: 1rem 0 1.5rem;
    padding: 0 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--karaoke-highlight), var(--accent-color));
    border-radius: 3px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

/* Lyrics Scroll Container */
.lyrics-scroll {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Karaoke Info Section */
.karaoke-info {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.song-timer, .lyrics-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.song-timer .separator {
    opacity: 0.5;
}

#current-time, #current-line-number {
    color: var(--karaoke-highlight);
    font-weight: 600;
}

#total-time, #total-lines {
    opacity: 0.8;
}

/* Enhanced Karaoke Container */
.karaoke-container {
    position: relative;
}

.karaoke-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

@media (max-width: 768px) {
    .karaoke-info {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
} 