:root {
    --color-primary: #4CAF50;
    --color-secondary: #2196F3;
    --color-success: #8BC34A;
    --color-error: #F44336;
    --color-warning: #FF9800;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.reveal {
    font-size: 1em;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.reveal h1, .reveal h2, .reveal h3 {
    text-transform: none;
    margin-bottom: 0.5em;
}

.reveal h1 { font-size: 1.8em; }
.reveal h2 { font-size: 1.4em; }
.reveal h3 { font-size: 1.1em; }

#status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 0.5em 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    font-size: 0.75em;
    border-bottom: 2px solid var(--color-primary);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

#connection-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    animation: pulse 2s infinite;
}

#connection-status.connected {
    background: var(--color-success);
    animation: none;
}

#connection-status.error {
    background: var(--color-error);
    animation: pulse-error 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-error {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#user-login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2em;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-card input {
    width: 100%;
    padding: 0.8em;
    margin: 0.5em 0;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1em;
    box-sizing: border-box;
}

.login-card button {
    width: 100%;
    padding: 0.8em;
    margin-top: 1em;
    border-radius: 6px;
    border: none;
    background: var(--color-primary);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.login-card button:hover {
    background: #45a049;
    transform: scale(1.02);
}

.login-card button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.message-box {
    padding: 1em;
    border-radius: 8px;
    margin: 1em 0;
    font-size: 0.9em;
}

.message-box.error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid var(--color-error);
    color: #ff6b6b;
}

.message-box.warning {
    background: rgba(255, 152, 0, 0.2);
    border: 2px solid var(--color-warning);
    color: #ffa726;
}

.message-box.success {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid var(--color-success);
    color: #81c784;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1em;
    margin: 0.6em 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8em;
    margin: 0.8em 0;
}

.card-small {
    padding: 0.7em;
    font-size: 0.8em;
}

.exercise {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid var(--color-secondary);
    padding: 1em;
    margin: 1em 0;
    border-radius: 4px;
}

.exercise input, .exercise select, .exercise textarea {
    width: 100%;
    padding: 0.6em;
    margin: 0.4em 0;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.85em;
    box-sizing: border-box;
}

.exercise button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.6em 1.2em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    margin-top: 0.4em;
    transition: all 0.3s;
}

.exercise button:hover {
    background: #45a049;
}

.exercise button:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

.feedback {
    margin-top: 0.6em;
    padding: 0.6em;
    border-radius: 4px;
    display: none;
    font-size: 0.85em;
}

.feedback.success {
    background: rgba(139, 195, 74, 0.2);
    border: 2px solid var(--color-success);
    color: var(--color-success);
    display: block;
}

.feedback.error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid var(--color-error);
    color: var(--color-error);
    display: block;
}

.data-preview {
    background: rgba(0, 0, 0, 0.5);
    padding: 1em;
    border-radius: 6px;
    margin: 1em 0;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.75em;
}

.record-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5em;
    margin: 0.3em 0;
    border-radius: 4px;
    border-left: 3px solid var(--color-primary);
}

.level-indicator {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-size: 0.65em;
    margin-left: 0.3em;
}

.level-1 { background: var(--color-success); }
.level-2 { background: var(--color-secondary); }
.level-3 { background: var(--color-warning); }

code {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.8em;
}

pre code {
    display: block;
    padding: 0.8em;
    overflow-x: auto;
    max-height: 250px;
}

.emoji-large {
    font-size: 1.8em;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

@media (max-width: 768px) {
    .reveal { font-size: 0.9em; }
    #status-bar { font-size: 0.65em; padding: 0.3em 0.5em; }
    .card-grid { grid-template-columns: 1fr; }
}