:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1b;
    --text-secondary: #2c3e50;
    --text-muted: #7f8c8d;
    --accent: #3498db;
    --hint-color: #95a5a6;
    --sentence-bg: #f9f9f9;
    --border-color: #eeeeee;
}

body.dark-mode {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --accent: #2980b9;
    --hint-color: #666666;
    --sentence-bg: #2d2d2d;
    --border-color: #333333;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#dark-mode-btn {
    background: var(--card-bg);
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.3s;
}

#dark-mode-btn:hover {
    transform: scale(1.1);
}

.container {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

h1 {
    color: var(--text-primary);
    margin-bottom: 30px;
}

#flashcard-container {
    perspective: 1000px;
    height: 450px;
    margin-bottom: 30px;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 15px;
}

.no-transition {
    transition: none !important;
}

.flashcard.is-loading .front,
.flashcard.is-loading .back {
    opacity: 0;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-sizing: border-box;
    transition: background-color 0.3s, opacity 0.2s ease-in-out;
}

.front {
    justify-content: center;
    align-items: center;
}

.back {
    transform: rotateY(180deg);
    text-align: left;
    align-items: flex-start;
    overflow-y: auto;
}

.expression-box h2 {
    font-size: 3.5rem;
    margin: 0;
    color: var(--text-secondary);
}

.card-header {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.card-header h2 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--text-secondary);
}

.reading-text {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 5px 0 0 0;
    font-weight: bold;
}

hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--hint-color);
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

.details {
    width: 100%;
}

.detail-item {
    margin-bottom: 20px;
}

.label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: bold;
    margin-bottom: 5px;
}

.value {
    font-size: 1.2rem;
    color: var(--text-secondary);
    word-break: break-all;
}

#sentence {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 5px;
    background: var(--sentence-bg);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(2px);
}

/* Disqus Styling */
#disqus_container {
    margin-top: 50px;
    padding-bottom: 50px;
    text-align: left;
}

.disqus-divider {
    border: 0;
    border-top: 2px solid var(--border-color);
    margin: 40px 0;
}

