/**
 * SALICON Experiment Styles
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a1a;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#experiment-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2a2a2a;
}

#salicon-canvas {
    max-width: 90vw;
    max-height: 90vh;
    cursor: none;
}

#salicon-cursor {
    z-index: 1000;
}

/* Instructions and screens */
.instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
    padding: 40px 60px;
    border-radius: 12px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.instructions h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

.instructions h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #fff;
}

.instructions p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #ccc;
}

.instructions ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 30px;
}

.instructions li {
    font-size: 15px;
    line-height: 1.8;
    color: #bbb;
}

.instructions strong {
    color: #fff;
}

.instructions code {
    background: #222;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    color: #0cf;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4a9eff, #2575fc);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #5aafff, #3585ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 117, 252, 0.4);
}

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

/* Fixation cross */
.fixation {
    font-size: 72px;
    font-weight: bold;
    color: #fff;
}

/* Error state */
.error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #442222;
    padding: 40px 60px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    border: 1px solid #663333;
}

.error h2 {
    color: #ff6666;
    margin-bottom: 16px;
}

.error p {
    color: #cc9999;
    margin-bottom: 12px;
}

/* Loading state */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto 0;
    border: 4px solid #333;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress indicator */
.progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #999;
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .instructions {
        padding: 30px 40px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .instructions h1 {
        font-size: 24px;
    }

    .instructions p {
        font-size: 14px;
    }
}
