/* Personality Test Frontend Styles */

.personality-test-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.test-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.test-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #4a90e2;
    margin-bottom: 30px;
    border-radius: 4px;
}

.test-instructions p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.test-instructions strong {
    color: #333;
    font-weight: 600;
}

/* Form Fields */
.form-field {
    margin-bottom: 20px;
}

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

.form-field .required {
    color: #e74c3c;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.form-field input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Test Table */
.test-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

.personality-test-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.personality-test-table thead th {
    background: #2c3e50;
    color: #fff;
    padding: 12px 8px;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

.personality-test-table thead th.row-num {
    width: 40px;
}

.personality-test-table thead th.col-l {
    background: #e74c3c;
}

.personality-test-table thead th.col-o {
    background: #27ae60;
}

.personality-test-table thead th.col-g {
    background: #f5a623;
}

.personality-test-table thead th.col-b {
    background: #3498db;
}

.personality-test-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.personality-test-table tbody tr:hover {
    background: #f8f9fa;
}

.personality-test-table td {
    padding: 12px 8px;
}

.personality-test-table td.row-label {
    font-weight: 600;
    text-align: center;
    color: #666;
}

.personality-test-table td.trait-cell {
    vertical-align: middle;
}

.trait-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.trait-text {
    text-align: center;
    font-size: 14px;
    color: #333;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trait-select {
    width: 60px;
    padding: 6px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background: #fff;
}

.trait-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.trait-select[data-selected="true"] {
    background: #e8f4f8;
    border-color: #4a90e2;
}

/* Messages */
.form-messages {
    margin: 20px 0;
}

.error-message {
    background: #fee;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    border-radius: 4px;
    color: #c0392b;
    margin-bottom: 15px;
}

.success-message {
    background: #efd;
    border-left: 4px solid #27ae60;
    padding: 15px;
    border-radius: 4px;
    color: #27ae60;
    margin-bottom: 15px;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.submit-button {
    background: #4a90e2;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Display */
.test-results {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #4a90e2;
}

.test-results h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.result-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 2px solid #ddd;
}

.result-box.highest {
    border-color: #27ae60;
    background: #efd;
}

.result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.result-score {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.result-classification {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    margin-top: 20px;
}

.classification-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.classification-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.classification-value.lion { color: #e74c3c; }
.classification-value.otter { color: #27ae60; }
.classification-value.golden { color: #f5a623; }
.classification-value.beaver { color: #3498db; }

.tie-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    color: #856404;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .personality-test-container {
        padding: 20px;
    }
    
    .test-title {
        font-size: 22px;
    }
    
    .trait-text {
        font-size: 13px;
        min-height: 35px;
    }
    
    .trait-select {
        width: 50px;
        padding: 4px;
        font-size: 14px;
    }
    
    .submit-button {
        padding: 12px 30px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .personality-test-table {
        font-size: 12px;
    }
    
    .personality-test-table td {
        padding: 8px 4px;
    }
    
    .trait-text {
        font-size: 12px;
        min-height: 30px;
    }
    
    .form-field input[type="text"],
    .form-field input[type="email"],
    .form-field input[type="tel"] {
        font-size: 14px;
    }
}
