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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --background: #f7fafc;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --card-background: #ffffff;
    --error-color: #f56565;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 700px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

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

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 8px;
}

.how-to-play-container {
    position: relative;
    display: inline-block;
    margin-top: 15px;
}

.help-button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-button:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.how-to-play-tooltip {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    width: 400px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.how-to-play-container:hover .how-to-play-tooltip,
.help-button:focus + .how-to-play-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.how-to-play-tooltip h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.how-to-play-tooltip ol {
    text-align: left;
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.how-to-play-tooltip li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.how-to-play-tooltip .tip {
    background: var(--background);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
    text-align: left;
}

.quote-container {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.press-conference-display {
    padding: 20px;
}

.instruction {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.conference-item {
    display: flex;
    align-items: baseline;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--background);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.conference-item:hover {
    transform: translateX(5px);
}

.conference-item .label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conference-item .value {
    font-size: 1.3rem;
    color: var(--text-primary);
    flex: 1;
}

.speaker-item {
    border-left-color: #667eea;
}

.speaker-item .label {
    color: #667eea;
}

.topic-item {
    border-left-color: #f093fb;
}

.topic-item .label {
    color: #f093fb;
}

.journalist-item {
    border-left-color: #4facfe;
    margin-top: 35px;
}

.journalist-item .label {
    color: #4facfe;
}

.periodical-item {
    border-left-color: #43e97b;
}

.periodical-item .label {
    color: #43e97b;
}

.new-quote-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.new-quote-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.new-quote-btn:active {
    transform: translateY(0);
}

.new-quote-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error {
    text-align: center;
    padding: 20px;
}

.error-message {
    color: var(--error-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.retry-button {
    padding: 10px 20px;
    font-size: 1rem;
    color: white;
    background: var(--error-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #e53e3e;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .quote-text {
        font-size: 1.3rem;
    }

    .quote-author {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .quote-text {
        font-size: 1.2rem;
    }
}
