:root {
    --primary-bg: #0f0f23;
    --secondary-bg: #1a1a2e;
    --accent-color: #16213e;
    --text-primary: #eee;
    --text-secondary: #a0a0a0;
    --glow-color: #00d4ff;
    --card-bg: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--glow-color);
    color: var(--primary-bg);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: 500;
}

.skip-link:focus {
    top: 6px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for better accessibility */
.mood-card:focus,
.btn:focus {
    outline: 2px solid var(--glow-color);
    outline-offset: 2px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--glow-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--glow-color), #ff6b6b, #4ecdc4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 800px;
    width: 100%;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mood-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mood-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.mood-card:hover::before {
    left: 100%;
}

.mood-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
    border-color: var(--glow-color);
}

.mood-card.active {
    background: linear-gradient(135deg, var(--glow-color), #4ecdc4);
    color: var(--primary-bg);
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

.mood-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.mood-name {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.mood-description {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.3;
}

.quote-section {
    max-width: 800px;
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.quote-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 50px 40px;
    backdrop-filter: blur(15px);
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-text.show {
    opacity: 1;
    transform: scale(1);
}

.quote-text::before,
.quote-text::after {
    content: '"';
    font-size: 3rem;
    color: var(--glow-color);
    opacity: 0.5;
    position: absolute;
    font-family: 'Playfair Display', serif;
}

.quote-text::before {
    top: -20px;
    left: -30px;
}

.quote-text::after {
    bottom: -40px;
    right: -30px;
}

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.btn {
    background: linear-gradient(45deg, var(--glow-color), #4ecdc4);
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::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:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header {
        margin-bottom: 40px;
    }

    .mood-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
        margin-bottom: 30px;
    }

    .mood-card {
        padding: 15px 10px;
        min-height: 100px;
    }

    .mood-emoji {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .mood-name {
        font-size: 0.85rem;
        margin-bottom: 3px;
    }

    .mood-description {
        font-size: 0.7rem;
    }

    .quote-card {
        padding: 30px 20px;
        min-height: 160px;
    }

    .quote-text {
        font-size: 1.3rem;
    }

    .quote-text::before,
    .quote-text::after {
        font-size: 2rem;
    }

    .quote-text::before {
        top: -15px;
        left: -20px;
    }

    .quote-text::after {
        bottom: -25px;
        right: -20px;
    }

    .controls {
        gap: 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .mood-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mood-card {
        padding: 12px 8px;
        min-height: 90px;
    }

    .mood-emoji {
        font-size: 1.3rem;
    }

    .mood-name {
        font-size: 0.8rem;
    }

    .mood-description {
        font-size: 0.65rem;
    }

    .quote-card {
        padding: 25px 15px;
        min-height: 140px;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .quote-text::before,
    .quote-text::after {
        font-size: 1.5rem;
    }

    .controls {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.8rem;
        min-width: 140px;
    }
}