/* ============================================
   EL DETECTIVE DE ELECTRONES - STYLES
   Diseñado por: Dr. Jorge Cruz-Angeles
   Estética: Detective Noir / Científico Moderno
   ============================================ */

:root {
    /* Paleta de Colores - Detective Theme */
    --color-primary: #1e3a8a; /* Azul oscuro detective */
    --color-primary-light: #3b82f6;
    --color-secondary: #f97316; /* Naranja energético */
    --color-accent: #fbbf24; /* Amarillo pistas */
    --color-success: #10b981; /* Verde correcto */
    --color-error: #ef4444; /* Rojo error */
    --color-dark: #0f172a;
    --color-light: #f8fafc;
    --color-gray: #64748b;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.3);
    
    /* Tipografía */
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Animaciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--gradient-dark);
    color: var(--color-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
}

button {
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

input, textarea {
    font-family: var(--font-sans);
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-screen.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.magnifying-glass {
    font-size: 4rem;
    animation: magnifyPulse 2s ease-in-out infinite;
}

@keyframes magnifyPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

@keyframes fadeOut {
    to { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* ============================================
   SCREEN MANAGEMENT
   ============================================ */

.screen {
    display: none;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.screen.active {
    display: block;
}

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

/* ============================================
   PHASE CONTAINERS
   ============================================ */

.phase-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

.phase-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.phase-badge {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--color-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.phase-header h2 {
    font-size: 3rem;
    color: var(--color-light);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ============================================
   REGISTRATION SCREEN
   ============================================ */

.registration-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: badgeEntry 1s ease-out;
}

@keyframes badgeEntry {
    0% { opacity: 0; transform: scale(0.5) rotate(-180deg); }
    60% { transform: scale(1.1) rotate(10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.detective-badge {
    width: 140px;
    height: 140px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--color-light);
    position: relative;
}

.detective-badge::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.badge-star {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.badge-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: var(--color-dark);
}

.main-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--color-gray);
    margin-bottom: 3rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.registration-form {
    margin-bottom: 2rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-light);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--color-light);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.form-group input::placeholder {
    color: var(--color-gray);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background: var(--gradient-accent);
    color: var(--color-dark);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-medium), height var(--transition-medium);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.btn-arrow {
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--color-light);
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-hint {
    background: var(--color-accent);
    color: var(--color-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-hint:hover {
    background: #fcd34d;
    transform: scale(1.05);
}

.btn-claude {
    background: var(--color-primary);
    color: var(--color-light);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-claude:hover {
    background: var(--color-primary-light);
    transform: scale(1.05);
}

/* ============================================
   INFO BOX
   ============================================ */

.info-box {
    background: rgba(249, 115, 22, 0.1);
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
}

.info-box p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* ============================================
   CRIME SCENE (Phase 1)
   ============================================ */

.crime-scene {
    max-width: 900px;
    margin: 0 auto;
}

.scene-animation {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.scene-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.molecule-container {
    position: relative;
    z-index: 1;
}

.molecule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 2rem;
    flex-wrap: wrap;
}

.atom {
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    animation: atomFloat 3s ease-in-out infinite;
}

.atom-fe {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.atom-o {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.atom-rust {
    background: linear-gradient(135deg, #b45309, #f97316);
}

@keyframes atomFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.electron-trail {
    font-size: 2.5rem;
    animation: electronZap 1.5s ease-in-out infinite;
}

@keyframes electronZap {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2) rotate(20deg); }
}

.arrow {
    color: var(--color-accent);
    font-size: 2.5rem;
}

.narrative-box {
    background: rgba(30, 58, 138, 0.2);
    border-left: 4px solid var(--color-primary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.narrative-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.highlight {
    background: rgba(249, 115, 22, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.highlight-danger {
    background: rgba(239, 68, 68, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    color: #fca5a5;
}

/* ============================================
   DETECTIVE KIT (Phase 2)
   ============================================ */

.progress-indicator {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
}

.detective-kit {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .detective-kit {
        grid-template-columns: 1fr;
    }
}

.hints-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.hints-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.hint-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hint-card {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 1rem;
    transition: all var(--transition-fast);
}

.hint-card:hover {
    background: rgba(251, 191, 36, 0.15);
    transform: translateX(5px);
}

.hint-number {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.hint-text {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.hint-example {
    font-size: 0.85rem;
    color: var(--color-gray);
    font-style: italic;
}

.exploration-area {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.exploration-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.instruction {
    color: var(--color-gray);
    margin-bottom: 2rem;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ============================================
   EXERCISE CARDS
   ============================================ */

.exercise-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.exercise-card.completed {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.exercise-card.error {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exercise-number {
    font-weight: 700;
    color: var(--color-accent);
}

.exercise-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.exercise-compound {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.exercise-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.element-input {
    flex: 1;
    min-width: 150px;
}

.element-input label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.element-input input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--color-light);
    font-size: 1rem;
    text-align: center;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.element-input input:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.08);
}

.element-input input.correct {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.element-input input.incorrect {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

.exercise-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-check {
    flex: 1;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-check:hover {
    background: var(--color-primary-light);
}

.exercise-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.exercise-feedback.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--color-success);
    color: #6ee7b7;
}

.exercise-feedback.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--color-error);
    color: #fca5a5;
}

/* ============================================
   MANUAL CONTENT (Phase 3)
   ============================================ */

.manual-content {
    max-width: 900px;
    margin: 0 auto;
}

.manual-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.manual-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.manual-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.concept-box {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.concept-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
}

.concept-symbol {
    font-size: 3rem;
    font-weight: 700;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 12px;
    color: var(--color-dark);
}

.concept-text {
    flex: 1;
}

.rules-list {
    list-style-position: inside;
    font-size: 1.05rem;
    line-height: 2;
}

.rules-list li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}

.redox-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .redox-comparison {
        grid-template-columns: 1fr;
    }
}

.redox-box {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
}

.redox-box.oxidation {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid var(--color-error);
}

.redox-box.reduction {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid var(--color-success);
}

.redox-box h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.redox-definition {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.redox-change {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--color-gray);
}

.redox-example {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
}

.redox-memory {
    text-align: center;
    font-size: 1.1rem;
    background: rgba(251, 191, 36, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

/* ============================================
   PRACTICE AREA (Phase 4)
   ============================================ */

.level-indicator {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.level-description {
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid var(--color-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.level-description h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.case-container {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.help-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   CONSOLIDATION (Phase 5)
   ============================================ */

.consolidation-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.certificate-badge {
    background: var(--gradient-accent);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.certificate-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: certificateGlow 4s linear infinite;
}

@keyframes certificateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.badge-star-large {
    font-size: 5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.certificate-badge h3 {
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.certificate-badge p {
    color: var(--color-dark);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.final-report {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--gradient-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-light);
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    background: var(--color-error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

/* Claude Modal Specific */
.claude-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.claude-conversation {
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 200px;
    max-height: 400px;
}

.mentor-intro {
    background: rgba(30, 58, 138, 0.3);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mentor-intro ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.mentor-intro li {
    margin: 0.5rem 0;
}

.claude-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.claude-message.student {
    background: rgba(249, 115, 22, 0.2);
    border-left: 3px solid var(--color-secondary);
    margin-left: 2rem;
}

.claude-message.mentor {
    background: rgba(30, 58, 138, 0.2);
    border-left: 3px solid var(--color-primary);
    margin-right: 2rem;
}

.message-label {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.claude-input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.claude-input-area textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--color-light);
    font-size: 1rem;
    resize: vertical;
    font-family: var(--font-sans);
}

.claude-input-area textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .phase-header h2 {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .molecule {
        font-size: 1.5rem;
    }
    
    .detective-kit {
        grid-template-columns: 1fr;
    }
    
    .hints-panel {
        position: static;
        max-height: none;
    }
    
    .help-section {
        flex-direction: column;
    }
    
    .exercise-inputs {
        flex-direction: column;
    }
    
    .element-input {
        min-width: 100%;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
