@import url('https://fonts.googleapis.com/css2?family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap');

:root {
    --bg-color: #bbc6fa;
    --box-bg: #ffffff;
    --text-color: #333333;
    --primary-color: #177ce5;
    --border-color: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --box-bg: #16213e;
    --text-color: #e9e9e9;
    --primary-color: #0f3460;
    --border-color: #2a2a4a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Playfair", serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.theme-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--box-bg);
    color: var(--text-color);
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.container {
    width: 100%;
    max-width: 700px;
}

.quote-box, .favorites-box {
    background: var(--box-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.quote-box h2, .favorites-box h3 {
    margin-bottom: 30px;
}

blockquote {
    font-size: 24px;
    min-height: 80px;
    margin-bottom: 10px;
    line-height: 1.4;
}

span {
    display: block;
    text-align: right;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

#favorite-btn { background: #ff4757; }
#ai-explain-btn { background: #2ed573; }
#tweet-btn { background: #000000; }
[data-theme="dark"] #tweet-btn { background: #555555; }
#speech-btn { background: #ffa502; }
#download-btn { background: #9b59b6; }

#ai-response-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(46, 213, 115, 0.1);
    border-left: 4px solid #2ed573;
    border-radius: 5px;
    text-align: left;
    font-family: sans-serif;
    line-height: 1.6;
}

.hidden {
    display: none;
}

.favorites-box ul {
    list-style: none;
    text-align: left;
}

.favorites-box li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-family: sans-serif;
    font-size: 14px;
    line-height: 1.5;
}