:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#quote-card {
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Quote Typography */
.quote-content {
    width: 100%;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#quote-text {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#quote-author {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 500;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.quote-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: inline-block;
}

.tag-ai {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.tag-classic {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn {
    background: var(--accent-color);
    color: #0f172a;
    padding-left: 2rem;
    padding-right: 2rem;
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Loading State */
.hidden {
    display: none !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: color 0.2s;
}

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

/* Toast */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
    z-index: 50;
    transition: opacity 0.3s, transform 0.3s;
}

#toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    #quote-card {
        padding: 3rem 1.5rem;
    }

    #quote-text {
        font-size: 1.75rem;
    }
}