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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #212121;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.controls-card {
    margin-bottom: 24px;
}

.controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background-color: #1565c0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0,0,0,0.05);
}

.btn-secondary {
    background-color: #009688;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background-color: #00796b;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.lab-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.lab-input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lab-name-input {
    flex: 1;
    min-width: 250px;
}

.lab-name-input label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lab-name-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
}

.lab-name-input input:focus {
    outline: none;
    border-color: #009688;
    box-shadow: 0 0 0 2px rgba(0,150,136,0.1);
}

.exercise-input {
    flex: 1;
    min-width: 300px;
}

.exercise-input label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exercise-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
}

.exercise-input input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.1);
}

.session-info {
    margin-bottom: 24px;
}

.session-card h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #1976d2;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.session-header h2 {
    margin-bottom: 0;
}

.lab-indicator {
    display: flex;
    align-items: center;
}

.lab-chip {
    background-color: #009688;
    color: white;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.session-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.session-url label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.url-container {
    display: flex;
    gap: 8px;
}

.session-url input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Roboto Mono', monospace;
    background-color: #f9f9f9;
}

.qr-code {
    display: flex;
    justify-content: center;
}

#qr-container svg {
    width: 200px;
    height: 200px;
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 8px;
    background: white;
}

.stats-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.stats-card h2,
.progress-card h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #1976d2;
}

.stats-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.chip .material-icons {
    font-size: 20px;
}

#progress-visualization {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.exercise-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exercise-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
}

.exercise-count {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.progress-bar {
    display: flex;
    height: 32px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 500;
    transition: width 0.3s ease;
}

.progress-segment.not-started {
    background-color: #9e9e9e;
}

.progress-segment.doing {
    background-color: #ff9800;
}

.progress-segment.done {
    background-color: #4caf50;
}

.exercise-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-label.not-started {
    color: #9e9e9e;
}

.stat-label.doing {
    color: #ff9800;
}

.stat-label.done {
    color: #4caf50;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.ready {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.status-badge.working {
    background-color: #ffe0b2;
    color: #e65100;
}

.snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: #323232;
    color: white;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
}

.snackbar.show {
    visibility: visible;
    animation: fadein 0.3s, fadeout 0.3s 2.7s;
}

.snackbar.success {
    background-color: #4caf50;
}

.snackbar.error {
    background-color: #f44336;
}

@keyframes fadein {
    from { bottom: 0; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 0; opacity: 0; }
}

@media (max-width: 768px) {
    .session-content {
        grid-template-columns: 1fr;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .exercise-input {
        min-width: 100%;
    }
}
