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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

button, .btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover, .btn-primary:hover {
    background: #5568d3;
}

#message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

#message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

#message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background: #34495e;
}

.content {
    flex: 1;
    padding: 30px;
}

.content h1 {
    margin-bottom: 30px;
    color: #333;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table thead {
    background: #667eea;
    color: white;
}

table th, table td {
    padding: 15px;
    text-align: left;
}

table tbody tr:hover {
    background: #f8f9fa;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 10px;
    position: relative;
    overflow-y: auto;
}

.close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    background: white;
    z-index: 1;
    padding: 0 10px;
}

.close:hover {
    color: #333;
}

.btn-primary {
    width: auto;
    display: inline-block;
    padding: 10px 20px;
    margin-bottom: 20px;
}

button.delete-test, button.delete-question {
    width: auto;
    padding: 5px 15px;
    background: #dc3545;
    margin-left: 10px;
}

button.delete-test:hover, button.delete-question:hover {
    background: #c82333;
}

.btn-preview {
    display: inline-block;
    padding: 5px 15px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-right: 5px;
    font-size: 14px;
}

.btn-preview:hover {
    background: #218838;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-secondary {
    width: auto;
    display: inline-block;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

#bulkJsonData {
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

#importResults {
    padding: 15px;
    border-radius: 5px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

#importResults ul {
    margin: 10px 0;
    padding-left: 20px;
}

#importResults li {
    margin: 5px 0;
}
