/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --secondary: #3f37c9;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --border: #edf2f4;
    --error: #ef233c;
    --success: #2ec4b6;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: #ebebeb;
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.login-container {
    max-width: 400px;
    margin: 10vh auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.alert-error {
    background: rgba(239, 35, 60, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 35, 60, 0.2);
}

.alert-success {
    background: rgba(46, 196, 182, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 196, 182, 0.2);
}

/* Dashboard UI */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.header h1 {
    font-size: 1.5rem;
    color: var(--text);
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background: rgba(0,0,0,0.05);
}

.nav-links .logout {
    color: var(--error);
}

.nav-links .logout:hover {
    background: rgba(239, 35, 60, 0.1);
}

.card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Table styling */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr {
    transition: background 0.2s ease;
}

tr:hover {
    background: rgba(0,0,0,0.02);
}

.action-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.pagination .active {
    background: var(--primary);
    color: white;
}

/* Edit Question Form */
.choices-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.choice-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.choice-item:last-child {
    margin-bottom: 0;
}

.choice-letter {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    width: 30px;
    padding-top: 0.5rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
