/* main.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* Header Styles */
header {
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card h2 {
    color: #1B3E6E;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #f0f0f0;
}

/* Button Styles */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(27, 62, 110, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 62, 110, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #AF8E5C 0%, #d4b483 100%);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5ee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1B3E6E;
    box-shadow: 0 0 0 3px rgba(27, 62, 110, 0.1);
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px 0;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e1e5ee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #1B3E6E;
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    margin-right: 15px;
    margin-top: 3px;
    accent-color: #1B3E6E;
}

.radio-option label {
    cursor: pointer;
    font-size: 1rem;
    flex: 1;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table th {
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #e1e5ee;
}

.table tr:hover {
    background-color: #f8f9ff;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #1B3E6E;
    color: #0c5460;
}

/* Navigation */
.nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-item {
    background: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #1B3E6E;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.nav-item:hover {
    background: #1B3E6E;
    color: white;
    transform: translateY(-2px);
}

/* MBTI Result Display */
.mbti-result {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    border-radius: 20px;
    margin: 30px 0;
}

.mbti-type {
    font-size: 4rem;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.mbti-category {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Progress Bar */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    height: 20px;
    background: #e1e5ee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    transition: width 0.5s ease;
}

/* Survey Card */
.survey-card {
    border: 2px solid #e1e5ee;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.survey-card:hover {
    border-color: #1B3E6E;
    box-shadow: 0 5px 20px rgba(27, 62, 110, 0.1);
}

.survey-card h3 {
    color: #1B3E6E;
    margin-bottom: 10px;
}

.survey-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .mbti-type {
        font-size: 3rem;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
    
    .nav {
        justify-content: center;
    }
}

/* Tab Styles */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #1B3E6E;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #1B3E6E;
    color: white;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(27, 62, 110, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Thêm */

/* QR Code và Mã Tham Chiếu */
.reference-code {
    background: linear-gradient(135deg, #1B3E6E 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.reference-code h3 {
    margin-top: 0;
    color: white;
    font-size: 1.5rem;
}

.reference-code .code {
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto;
    display: inline-block;
    min-width: 250px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.reference-code .code:hover {
    background: rgba(255, 255, 255, 0.3);
}

.qr-code-box {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    margin: 15px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.qr-code-container img {
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.qr-code-container img:hover {
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid;
    }
    
    .mbti-result {
        background: white !important;
        color: black !important;
        border: 2px solid #1B3E6E !important;
    }
    
    .mbti-type {
        color: black !important;
        text-shadow: none !important;
    }
    
    .action-buttons, .nav, .no-print {
        display: none !important;
    }
    
    .reference-code {
        background: #1B3E6E !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        color: white !important;
    }
    
    .reference-code * {
        color: white !important;
    }
    
    .qr-code-box {
        background: white !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .reference-code {
        padding: 20px;
    }
    
    .reference-code .code {
        font-size: 1.4rem;
        min-width: 200px;
        padding: 12px;
    }
    
    .qr-code-container img {
        width: 120px;
        height: 120px;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

/* Alert Messages */
.alert-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}