/* Global Styles */
* { box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f0f0;
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    background: #003366;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    line-height: 1.2;
}

.btn:hover {
    background: #002244;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

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

/* Navigation */
.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card h3 {
    color: #003366;
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.card p {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.4;
}

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

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row label {
    min-width: 120px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row textarea {
    flex: 1;
    min-height: 80px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

/* Question Styles */
.question {
    background: #f9f9f9;
    border-left: 4px solid #003366;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.question-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.4;
}

.question textarea,
.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    resize: vertical;
    box-sizing: border-box;
    background: white;
    transition: border-color 0.2s;
}

.question textarea:focus,
.form-textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.option:hover {
    background: #f0f0f0;
}

.option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.option label {
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    flex: 1;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background: #003366;
    color: white;
    font-weight: bold;
    font-size: 13px;
}

tr:hover {
    background: #f8f9fa;
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003366;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #003366;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Admin Panel Specific Styles */
.section {
    margin: 30px 0;
}

.section h2 {
    color: #003366;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

.form-row input[type="text"] {
    flex: 1;
}

.form-row textarea {
    flex: 2;
    resize: vertical;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
}

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

.type-selector {
    margin-bottom: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
        border-radius: 4px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-row label {
        min-width: auto;
    }
    
    .form-row textarea,
    .question textarea,
    .form-textarea {
        min-height: 120px;
        padding: 15px;
        font-size: 16px;
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .question {
        padding: 15px;
        margin: 15px 0;
    }
    
    .question-title {
        font-size: 14px;
    }
    
    .option {
        padding: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card h3 {
        font-size: 16px;
    }
    
    .card p {
        font-size: 13px;
    }
    
    .question {
        padding: 12px;
    }
    
    .question-title {
        font-size: 13px;
    }
    
    .question textarea,
    .form-textarea {
        min-height: 140px;
        padding: 12px;
        font-size: 16px;
    }
    
    .form-row textarea {
        min-height: 140px;
        font-size: 16px;
    }
    
    .option {
        padding: 6px;
    }
    
    .option label {
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 2px;
    }
}