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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #0ea5e9;
    --background-dark: #0f172a;
    --background-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --glow-color: rgba(99, 102, 241, 0.5);
    --success-color: #10b981;
    --gradient-1: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-2: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Stars Background */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent);
    background-size: 200px 200px;
    animation: starsMove 60s linear infinite;
    opacity: 0.3;
    z-index: -2;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

/* Particle Container */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Header Styles */
.header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.8) 100%);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 10px 50px rgba(99, 102, 241, 0.2);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: headerPulse 8s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.header-content {
    position: relative;
    z-index: 1;
}

.portrait-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.portrait-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: var(--gradient-1);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.6;
    animation: portraitGlow 3s ease-in-out infinite;
}

@keyframes portraitGlow {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

.einstein-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    position: relative;
    z-index: 2;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.einstein-portrait:hover {
    transform: scale(1.05) rotate(2deg);
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px var(--glow-color);
    animation: titleFloat 4s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

/* Controls Container */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.controls-left, .controls-right {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: var(--gradient-1);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-language {
    background: var(--gradient-2);
}

/* Theme Filter */
.theme-filter {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.theme-filter:hover {
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.theme-filter:focus {
    border-color: var(--secondary-color);
}

/* Quote of the Day */
.quote-of-day-container {
    margin-bottom: 4rem;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

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

.qod-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-1);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px var(--glow-color);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 15px var(--glow-color); }
    50% { box-shadow: 0 4px 25px var(--glow-color); }
}

/* Quote Cards */
.quote-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.9));
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.quote-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 8rem;
    color: rgba(99, 102, 241, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4);
}

.quote-of-day-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid var(--primary-color);
}

.quote-content {
    position: relative;
    z-index: 1;
}

.quote-text {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.quote-author {
    text-align: right;
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.quote-author::before {
    content: '— ';
}

/* Quote Actions */
.quote-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.action-btn {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: white;
}

.action-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.action-btn.active {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* Quotes Grid */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.quote-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Favorites Section */
.favorites-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid rgba(99, 102, 241, 0.3);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 3rem;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 2px solid var(--primary-color);
    color: var(--text-secondary);
}

.footer p {
    margin: 0.5rem 0;
}

/* Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-left, .controls-right {
        width: 100%;
        justify-content: center;
    }
    
    .quotes-grid, .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-text {
        font-size: 1.1rem;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .einstein-portrait {
        width: 120px;
        height: 120px;
    }
    
    .portrait-glow {
        width: 150px;
        height: 150px;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .quote-text {
        font-size: 1rem;
    }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

/* Transition effects */
.fade-enter {
    animation: fadeInUp 0.5s ease-out;
}

.fade-exit {
    animation: fadeOutDown 0.5s ease-out;
}

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

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Scroll animations */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: scrollReveal 0.6s ease-out;
}
