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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.container.wide {
    max-width: 600px;
}

/* Typography */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a2e;
    text-align: center;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a2e;
    text-align: center;
}

.description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #4a6cf7;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4a6cf7;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #3852d3;
}

.btn-secondary {
    background-color: #e1e5eb;
    color: #444;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-logout {
    background-color: #ef4444;
    color: #fff;
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-logout:hover {
    background-color: #dc2626;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e1e5eb;
}

.toggle-group:last-child {
    border-bottom: none;
}

.toggle-label {
    font-weight: 500;
    color: #333;
}

.toggle-status {
    font-size: 0.875rem;
    margin-left: 8px;
}

.toggle-status.working {
    color: #059669;
}

.toggle-status.failing {
    color: #dc2626;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ef4444;
    transition: 0.3s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #22c55e;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Sections */
.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5eb;
}

.section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Dashboard Cards */
.card {
    background: #f8fafc;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.card:last-child {
    margin-bottom: 0;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.card-result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.card-result.show {
    display: block;
}

.card-result.correct {
    background-color: #d1fae5;
    color: #065f46;
}

.card-result.incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5eb;
}

.header h1 {
    margin-bottom: 0;
}

/* Admin Link */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a2e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.admin-link:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 540px) {
    .container {
        padding: 24px;
    }

    h1 {
        font-size: 1.5rem;
    }
}
