:root {
    /* Kodland Premium Blue & Lime Green Palette */
    --primary: #5988ff;        /* Kodland Blue */
    --primary-hover: #4a7ae8;
    --primary-light: #eff4ff;  
    
    --accent: #d2ff5e;         /* Kodland Lime Green */
    
    --navy: #0A2540;          /* Deep Tech Navy/Blue for text */
    --navy-light: #1c3d5a;
    
    --text-main: #2D3748;
    --text-muted: #718096;
    
    --bg-main: #F4F7F6;       /* Soft greyish-green bg */
    --white: #FFFFFF;
    
    /* Potential Colors */
    --c-mukemmel: #5988ff; 
    --c-cokiyi: #00A3FF;
    --c-iyi: #FFB300;
    --c-gelisim: #FF6B00;
    --c-destek: #FF3B30;

    /* Styling */
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 10px 30px rgba(89, 136, 255, 0.15);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); }
p { color: var(--text-muted); }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2.5rem; }
.hidden { display: none !important; }

/* HEADER */
.app-header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 1px 15px rgba(0,0,0,0.03);
    margin-bottom: 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container { display: flex; justify-content: space-between; align-items: center; }

.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-text { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.logo-text span { color: var(--primary); font-weight: 900; }

.header-tag {
    font-size: 0.85rem; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 6px 16px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* CARDS & FORM */
.premium-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    margin-bottom: 3rem;
    border-top: 6px solid var(--primary);
}

.card-header { text-align: center; margin-bottom: 3rem; }
.card-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }

.section-badge {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--navy);
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #edf2f7;
}
.section-badge span {
    background: var(--accent); color: var(--navy); width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1rem;
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.scores-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .scores-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .scores-grid { grid-template-columns: 1fr; } }
.row-span { grid-column: span 2; }
@media (max-width: 768px) { .row-span { grid-column: span 1; } }
.full-width { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; }
.form-group label {
    font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--navy-light);
    display: flex; justify-content: space-between; align-items: center;
}
.max-badge { font-size: 0.75rem; background: #edf2f7; color: var(--text-muted); padding: 3px 8px; border-radius: 6px; font-weight: 700; }

input, textarea {
    padding: 0.85rem 1.25rem; border: 2px solid #e2e8f0; border-radius: var(--radius-md);
    background-color: #fafbfc; font-family: var(--font-body); font-size: 1rem; transition: all 0.3s; color: var(--navy); font-weight: 500;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--primary); background-color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.75rem; border-radius: var(--radius-md); font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
    cursor: pointer; transition: all 0.3s; border: none; text-decoration: none;
}
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-float); }
.btn-glow { box-shadow: 0 4px 15px rgba(89, 136, 255, 0.4); }

.btn-secondary { background-color: #edf2f7; color: var(--navy); }
.btn-secondary:hover { background-color: #e2e8f0; }

.btn-large { width: 100%; padding: 1.25rem; font-size: 1.15rem; }

/* LOADING OVERLAY (Breathtaking Screen Share View) */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--navy); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

.loader-content { text-align: center; color: white; width: 100%; max-width: 400px; padding: 20px; }

.loader-logo { margin-bottom: 2rem; animation: pulseLogo 2s infinite ease-in-out; }
@keyframes pulseLogo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.spinner-ring {
    width: 80px; height: 80px; border: 6px solid rgba(255,255,255,0.1); border-top: 6px solid var(--primary);
    border-radius: 50%; margin: 0 auto 2rem; animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-title { color: white; font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: 0.5px; }
.loading-subtitle { color: #a0aec0; font-size: 1.1rem; }

.progress-bar-container { height: 8px; background: rgba(255,255,255,0.1); border-radius: 20px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width 0.4s ease; }

/* REPORT DOCUMENT */
.result-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-bottom: 1.5rem; }

.report-document {
    background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
    padding: 3rem; margin-bottom: 4rem; position: relative; overflow: hidden;
}

.report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 2px solid #f0f4f8;
}

.header-left .logo-area { margin-bottom: 0.5rem; }
.report-title-doc { font-family: var(--font-body); font-size: 0.95rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.report-meta { text-align: right; background: #fafbfc; padding: 1rem 1.5rem; border-radius: var(--radius-md); border: 1px solid #edf2f7; }
.meta-item { margin-bottom: 0.4rem; font-size: 0.95rem; }
.meta-item:last-child { margin-bottom: 0; }
.meta-item span { color: var(--text-muted); display: inline-block; width: 75px; }
.meta-item strong { color: var(--navy); }
.meta-item em { color: var(--text-muted); font-style: normal; font-size: 0.85rem; }

/* Score Hero */
.score-hero {
    display: flex; align-items: center; gap: 3rem; background: var(--primary-light);
    padding: 2.5rem; border-radius: var(--radius-lg); margin-bottom: 3rem;
}

@media(max-width: 600px) { .score-hero { flex-direction: column; text-align: center; } }

.score-circle-wrapper { position: relative; width: 180px; height: 180px; flex-shrink: 0; }
.circular-chart { display: block; max-width: 100%; max-height: 100%; }
.circle-bg { fill: none; stroke: #ffffff; stroke-width: 3; }
.circle { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 1.5s cubic-bezier(0.1, 0.7, 0.1, 1); }

.score-value-inner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-number { font-family: var(--font-heading); font-size: 4rem; font-weight: 900; color: var(--navy); line-height: 1; }
.score-max { font-size: 1rem; color: var(--text-muted); font-weight: 600; margin-top: -5px; }

.eval-title { font-size: 1.1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 1rem; }
.potential-badge {
    display: inline-block; padding: 0.6rem 2rem; border-radius: 30px;
    font-family: var(--font-heading); font-weight: 900; font-size: 1.5rem; color: var(--white); margin-bottom: 1rem;
}
.score-desc { font-size: 1rem; line-height: 1.6; color: var(--navy-light); }

/* Details */
.content-divider {
    text-align: center; position: relative; margin: 2rem 0;
}
.content-divider::before {
    content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #e2e8f0; z-index: 1;
}
.content-divider span {
    background: var(--white); padding: 0 15px; position: relative; z-index: 2;
    font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--navy);
}

.criteria-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem;
}

.criteria-card {
    background: #ffffff; border: 1px solid #edf2f7; border-radius: var(--radius-md);
    padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.crit-icon {
    width: 45px; height: 45px; background: #f8fafc; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}

.crit-bar-bg { flex-grow: 1; height: 8px; background: #edf2f7; border-radius: 4px; overflow: hidden; margin-top: 8px; position: absolute; bottom: 0; left:0; width:100%; /* we will place it inside the card via relative positioning actually */ }

.criteria-card { flex-direction: column; align-items: stretch; position: relative; padding-bottom: 2rem; }
.crit-icon { position: absolute; top: 1.25rem; left: 1.25rem; width: 36px; height: 36px; font-size: 1.2rem; }
.crit-info { display: flex; justify-content: space-between; align-items: center; margin-left: 50px; margin-top: 5px; }
.crit-name { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.crit-val { font-family: var(--font-heading); font-size: 1.1rem; color: var(--text-muted); }
.crit-val strong { color: var(--navy); font-size: 1.3rem; font-weight: 900; }

/* Analysis Box */
.analysis-box {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: var(--radius-lg);
    padding: 2.5rem; display: flex; gap: 2rem; position: relative; overflow: hidden;
}
.analysis-box::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--primary);
}
.analysis-icon { font-size: 3rem; flex-shrink: 0; opacity: 0.9; }
.analysis-text p { font-size: 1.05rem; color: var(--navy-light); margin-bottom: 1.25rem; line-height: 1.8; }
.analysis-text p:last-child { margin-bottom: 0; }
.analysis-text strong { color: var(--navy); font-weight: 700; background: var(--primary-light); padding: 0 4px; border-radius: 4px; }

/* Note Box */
.teacher-note-box {
    margin-top: 2rem; background: #FEFCBF; border: 1px solid #F6E05E; border-radius: var(--radius-md);
    padding: 1.5rem;
}
.tnote-header { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #975A16; margin-bottom: 0.5rem; font-family: var(--font-heading); font-size: 1.1rem; }
.teacher-note-box p { color: #744210; font-style: italic; line-height: 1.6; }

.report-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: 4rem;
    padding-top: 2rem; border-top: 2px dashed #edf2f7; font-size: 0.85rem; color: #a0aec0;
}
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #718096; }

@media print {
    body { background: white; }
    .no-print { display: none !important; }
    .report-document { box-shadow: none; padding: 0; margin: 0; border: none; }
    .score-hero { background: transparent; border: 2px solid #edf2f7; padding: 1.5rem; }
    .analysis-box { border: 2px solid #edf2f7; }
    /* Prevent page breaks inside cards */
    .criteria-cards, .score-hero, .analysis-box { page-break-inside: avoid; }
}
