/* Modern Aptitude Test Tool Styles */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
}
#apt-designation {
  height: 60px !important;
  border-radius: 10px;
  width: 100%;
}
#aptitude-test-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Nunito Sans', sans-serif;
}

/* Section Card */
.apt-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.apt-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
   
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.icon-wrapper .icon-text {
    font-size: 48px;
}

.apt-header h2 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 25px;
    margin: 30px 30px 0 30px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.info-item svg {
    color: #667eea;
    flex-shrink: 0;
}

.info-item span {
    font-weight: 600;
    color: #4a5568;
    font-size: 15px;
}

/* Form Styles with Floating Labels */
#userInfoForm {
    padding: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-group input {
    width: 100%;
    padding: 18px 18px 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f7fafc;
    height: 60px!important;
}

.form-group label {
    position: absolute;
    left: 18px;
    top: 18px;
    color: #a0aec0;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
    background-color: transparent;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:focus + label,
.form-group input:valid + label {
    top: -10px;
    left: 14px;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    background-color: white;
    padding: 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Styles */
.apt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apt-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.apt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.apt-btn-primary:active {
    transform: translateY(0);
}

.apt-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.apt-btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.apt-btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-top: 10px;
}

/* Quiz Header */
.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.progress-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

#question-progress {
    font-weight: 600;
    font-size: 14px;
}

#current-q {
    font-size: 18px;
    font-weight: 700;
}

/* Quiz Form */
#quizForm {
    padding: 40px;
}

.question-block {
    background: #f7fafc;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.question-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.question-block h3 {
    color: #667eea;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.6;
}

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

.option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-label:hover {
    background-color: #f7fafc;
    border-color: #667eea;
    transform: translateX(5px);
}

.option-label input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.option-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.option-label span {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.5;
}

/* Result Styles */
#result-section {
    padding: 60px 40px;
    text-align: center;
}

.result-card {
    padding: 50px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.result-card h3 {
    font-size: 48px;
    margin: 0 0 30px 0;
    font-weight: 800;
}

.score-display {
    margin: 30px 0;
}

.score {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 500;
}

.score strong {
    font-size: 28px;
    font-weight: 800;
}

.percentage {
    font-size: 72px;
    font-weight: 900;
    margin: 30px 0;
    line-height: 1;
}

.result-card.excellent {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 3px solid #28a745;
}

.result-card.excellent h3,
.result-card.excellent .percentage {
    color: #28a745;
    text-shadow: 2px 2px 4px rgba(40, 167, 69, 0.2);
}

.result-card.good {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 3px solid #17a2b8;
}

.result-card.good h3,
.result-card.good .percentage {
    color: #17a2b8;
    text-shadow: 2px 2px 4px rgba(23, 162, 184, 0.2);
}

.result-card.average {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 3px solid #ffc107;
}

.result-card.average h3,
.result-card.average .percentage {
    color: #e6a800;
    text-shadow: 2px 2px 4px rgba(255, 193, 7, 0.2);
}

.result-card.poor {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 3px solid #dc3545;
}

.result-card.poor h3,
.result-card.poor .percentage {
    color: #dc3545;
    text-shadow: 2px 2px 4px rgba(220, 53, 69, 0.2);
}

#restart-btn {
    margin-top: 20px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    #aptitude-test-container {
        margin: 20px auto;
        padding: 10px;
    }

    .apt-header {
        padding: 30px 20px;
    }

    .apt-header h2 {
        font-size: 26px;
    }

    .info-card {
        margin: 20px 20px 0 20px;
        padding: 20px;
        gap: 15px;
    }

    #userInfoForm,
    #quizForm {
        padding: 25px;
    }

    .quiz-header {
        flex-direction: column;
        gap: 15px;
        padding: 25px;
    }

    .quiz-header h2 {
        font-size: 24px;
    }

    .question-block {
        padding: 20px;
    }

    .question-text {
        font-size: 16px;
    }

    .option-label {
        padding: 12px 15px;
    }

    .result-card {
        padding: 30px 20px;
    }

    .result-card h3 {
        font-size: 36px;
    }

    .percentage {
        font-size: 56px;
    }

    #result-section {
        padding: 40px 25px;
    }
}

@media (max-width: 480px) {
    .info-card {
        grid-template-columns: 1fr;
    }

    .apt-header h2 {
        font-size: 22px;
    }

    .question-text {
        font-size: 15px;
    }

    .option-label span {
        font-size: 14px;
    }

    .percentage {
        font-size: 48px;
    }

    .result-card h3 {
        font-size: 28px;
    }
}