/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9fafb;
    color: #374151;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 28rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-icon {
    margin-bottom: 1rem;
}

.brain-icon {
    width: 4rem;
    height: 4rem;
    color: #2563eb;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.header-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.shreya-text {
    font-weight: 500;
    color: #10b981;
}

.preya-text {
    font-weight: 500;
    color: #f59e0b;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.progress-percent {
    font-size: 0.75rem;
    color: #9ca3af;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #2563eb;
    border-radius: 9999px;
    transition: width 0.3s ease-out;
    width: 0%;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.card-content {
    padding: 2rem 1.5rem;
}

/* Welcome Screen */
.welcome-icon {
    margin-bottom: 1rem;
}

.welcome-icon svg {
    width: 3rem;
    height: 3rem;
    color: #2563eb;
    margin: 0 auto;
    display: block;
}

.card-content h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.75rem;
    text-align: center;
}

.welcome-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: center;
}

.concept-explanations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    font-size: 0.875rem;
}

.concept-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.concept-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.shreya-concept svg {
    color: #10b981;
}

.preya-concept svg {
    color: #f59e0b;
}

/* Question Screen */
.question-icon {
    text-align: center;
    margin-bottom: 0.75rem;
}

.question-icon svg {
    width: 2rem;
    height: 2rem;
    color: #6b7280;
}

#questionNumber {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

#questionText {
    color: #374151;
    line-height: 1.5;
    text-align: center;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

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

.btn-yes {
    background-color: #10b981;
    color: white;
    margin-bottom: 0.75rem;
}

.btn-yes:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-no {
    background-color: #ef4444;
    color: white;
}

.btn-no:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.answer-buttons {
    display: flex;
    flex-direction: column;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Result Screen */
.result-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.result-icon svg {
    width: 4rem;
    height: 4rem;
}

.result-icon.shreya svg {
    color: #10b981;
}

.result-icon.preya svg {
    color: #f59e0b;
}

#resultTitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: center;
}

#resultTitle.shreya {
    color: #10b981;
}

#resultTitle.preya {
    color: #f59e0b;
}

#resultMessage {
    font-size: 1.125rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-align: center;
}

.result-explanation {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    text-align: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: 0.75rem;
    max-width: 28rem;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #6b7280;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-content {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-section {
    padding: 1rem;
    border-radius: 0.5rem;
}

.shreya-info {
    background-color: #ecfdf5;
}

.preya-info {
    background-color: #fffbeb;
}

.tips-info {
    background-color: #eff6ff;
}

.info-section h4 {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.shreya-info h4 {
    color: #059669;
}

.preya-info h4 {
    color: #d97706;
}

.tips-info h4 {
    color: #2563eb;
}

.info-section h4 svg {
    width: 1rem;
    height: 1rem;
}

.info-section p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
}

.info-section ul {
    list-style: disc;
    list-style-position: inside;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #374151;
}

.info-section li {
    margin-bottom: 0.25rem;
}

/* Password Modal Styles */
.password-section {
    text-align: center;
    padding: 1rem 0;
}

.password-icon {
    margin-bottom: 1rem;
}

.password-icon svg {
    width: 3rem;
    height: 3rem;
    color: #6b7280;
    margin: 0 auto;
    display: block;
}

.password-section p {
    margin-bottom: 1.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.password-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.password-input-container input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out;
    background-color: white;
}

.password-input-container input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-input-container input::placeholder {
    color: #9ca3af;
}

.password-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.password-error svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Screen Management */
.screen {
    animation: fadeIn 0.5s ease-in-out;
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .card-content {
        padding: 1.5rem 1rem;
    }
    
    .modal {
        margin: 0.5rem;
        max-height: 90vh;
    }
}
