:root {
    --bg-color: #121212;
    --surface-color: #303030;
    --primary-color: #5a9dfc;
    --secondary-color: #4acfe1;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --error-color: #cf6679;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.card p {
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--surface-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

input[type="text"],
input[type="url"],
input[type="file"] {
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Reader Specific Styles */
.reader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.word-display {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    min-height: 1.2em;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.controls {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.slider-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-label {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input[type="range"] {
    width: 100%;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -8px;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--surface-color);
    border-radius: 2px;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.timer {
    text-align: center;
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 1rem;
    opacity: 0.7;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Author List Styles */
.author-list {
    list-style: none;
}

.author-item {
    background-color: var(--surface-color);
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-speed);
}

.author-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.article-count {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-icon {
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: transform var(--transition-speed);
}

.card:hover .card-icon {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.btn-icon {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin-top: 1.5rem;
}

.btn-large {
    width: 64px;
    height: 64px;
}

.btn svg {
    pointer-events: none;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .word-display {
        font-size: 2.5rem;
    }

    .control-buttons {
        flex-wrap: wrap;
    }
}