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

body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: #f5f2ed;
    min-height: 100vh;
    color: #333;
}

h1, h2 {
    font-family: 'League Spartan', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

header {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

header h1 {
    font-family: 'League Spartan', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
    letter-spacing: 0.02em;
}

header p {
    font-size: 1.4rem;
    opacity: 0.9;
}

.title-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vibe-selector {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vibe-selector h2 {
    font-family: 'League Spartan', sans-serif;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vibe-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    row-gap: 6px;
    justify-items: center;
    margin: 0px auto;
    max-width: 800px;
}

.vibe-btn {
    padding: 0;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    aspect-ratio: 2/3;
    position: relative;
}

.vibe-btn img {
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
}


.vibe-btn img:hover {
    transform: scale(1.05);
}

.vibe-btn.active {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.quote-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-card {
    background-color: #fff;
    border-left: 6px solid #a45cc3;
    padding: 1.2rem;
    margin: 0px auto 10px auto;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    font-size: 1.25rem;
    line-height: 1.6;
    position: relative;
}

.quote-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.quote-author {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: #333;
    margin-top: 0.5rem;
    font-weight: 600;
    text-align: right;
    line-height: 1.8;
}

.quote-category {
    font-size: 0.9rem;
    color: #777;
    text-align: right;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    background-color: #a45cc3;
    color: #fff;
    padding: 1rem 2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    font-family: 'League Spartan', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: #8b49a9;
}

.action-btn:active {
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quote-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.quote-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .quote-card {
        padding: 30px 20px;
    }
    
    .quote-text {
        font-size: 1.3rem;
    }
    
    .vibe-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .vibe-btn {
        padding: 0;
        font-size: 0.9rem;
    }
    
    .vibe-btn img {
        width: 100%;
        max-width: 160px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .quote-text {
        font-size: 1.2rem;
    }
    
    .vibe-buttons {
        grid-template-columns: 1fr 1fr;
    }
}