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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 2rem;
}

h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Canvas styles */
.canvas-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 25px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Tools and controls */
.tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    max-width: 800px;
    padding: 15px 0;
}

.color-buttons {
    display: flex;
    gap: 12px;
}

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #e1e4e8;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.color-btn.active {
    border-color: #333;
    transform: scale(1.1);
}

.color-btn.black { background-color: #000000; }
.color-btn.blue { background-color: #2563eb; }
.color-btn.red { background-color: #ef4444; }
.color-btn.green { background-color: #10b981; }

.tool-btn, button {
    padding: 10px 18px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tool-btn:hover, button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tool-btn.active {
    background-color: #1d4ed8;
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tool-btn:disabled, button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

input[type="range"] {
    width: 120px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e1e4e8;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}

/* Teacher view specific styles */
.session-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.instructions {
    text-align: center;
    max-width: 400px;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.highlight {
    font-weight: 600;
    color: #ef4444;
    font-size: 1.3em;
}

#qrcode {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#qrcode canvas {
    border-radius: 4px;
}

.url-container {
    margin: 20px 0;
}

.copy-url {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#sessionUrl {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
}

#connection-status {
    margin-top: 15px;
    font-weight: 500;
    padding: 8px 16px;
    background-color: #f0f9ff;
    border-radius: 8px;
    display: inline-block;
}

.error {
    color: #ef4444;
    background-color: #fee2e2;
}

/* Sync status styling */
.sync-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ccc;
    transition: all 0.3s ease;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e1e4e8;
}

.student-name {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Student grid layout */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.student-canvas-container {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.student-canvas-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.student-canvas-container canvas {
    border: none;
    display: block;
    width: 100%;
}

/* Login page styles */
.login-container {
    max-width: 500px;
    margin: 80px auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    margin-bottom: 15px;
}

.login-container p {
    color: #64748b;
    margin-bottom: 25px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #334155;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-btn {
    padding: 12px;
    background-color: #3b82f6;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.2s;
}

.login-btn:hover {
    background-color: #2563eb;
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .session-info {
        flex-direction: column;
        align-items: center;
    }
    
    .student-grid {
        grid-template-columns: 1fr;
    }
    
    .tools {
        flex-direction: column;
        gap: 15px;
    }
    
    .color-buttons {
        order: -1;
    }
} 
