:root {
    --primary-color: #FF6B6B;
    --primary-hover: #FF5252;
    --secondary-color: #4ECDC4;
    --secondary-hover: #3DBDB4;
    --accent-color: #FFE66D;
    --dark-color: #2C3E50;
    --light-color: #F7F9F9;
    --success-color: #28a745;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --error-color: #dc3545;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --warning-color: #856404;
    --warning-bg: #fff3cd;
    --warning-border: #ffeeba;
    --info-color: #0c5460;
    --info-bg: #d1ecf1;
    --info-border: #bee5eb;
    --bg-gradient: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    background: linear-gradient(135deg, #FF9A9E, #FAD0C4, #FFD1FF, #B5DEFF, #A8E6CF, #FFD3B6, #FF9A9E);
    background-size: 600% 600%;
    animation: rainbowBg 20s ease infinite;
    color: var(--dark-color);
    line-height: 1.6;
}

@keyframes rainbowBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === CONTAINER === */
.container {
    background: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 90%;
    margin-top: 2rem;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    color: var(--dark-color);
    margin: 0.5em 0;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition);
    background: #fff;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

/* === BUTTONS === */
button, .btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

button:hover, .btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

button:active, .btn:active {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.btn-secondary {
    background-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.btn-success {
    background-color: var(--success-color);
}
.btn-success:hover {
    background-color: #218838;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Button States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}
.btn-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.btn-success-state {
    background-color: var(--success-color) !important;
    animation: successPulse 0.5s ease;
}

.btn-error-state {
    background-color: var(--error-color) !important;
    animation: shake 0.5s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* === CHECKBOX === */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
    justify-content: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.checkbox-group:hover {
    border-color: var(--secondary-color);
}

.checkbox-group.confirm-checkbox {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    user-select: none;
}

/* === MESSAGE AREA === */
.message-area {
    margin-bottom: 15px;
    min-height: 0;
    transition: var(--transition);
}

.msg {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.msg-success {
    background: var(--success-bg);
    color: #155724;
    border: 1px solid var(--success-border);
}

.msg-error {
    background: var(--error-bg);
    color: #721c24;
    border: 1px solid var(--error-border);
}

.msg-warning {
    background: var(--warning-bg);
    color: var(--warning-color);
    border: 1px solid var(--warning-border);
}

.msg-info {
    background: var(--info-bg);
    color: var(--info-color);
    border: 1px solid var(--info-border);
}

.msg-icon { font-size: 1.2rem; flex-shrink: 0; }
.msg-content { flex: 1; }
.msg-title { font-weight: 700; margin-bottom: 4px; }
.msg-detail { font-weight: 400; font-size: 0.9rem; opacity: 0.9; }

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

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

/* === PROGRESS STEPS === */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 38px;
    width: 2px;
    height: calc(100% - 10px);
    background: #dee2e6;
}

.progress-step.active:not(:last-child)::after {
    background: var(--secondary-color);
}

.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #adb5bd;
    transition: var(--transition);
    z-index: 1;
}

.progress-step.active .step-indicator {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: #fff;
    animation: stepPulse 1.5s ease infinite;
}

.progress-step.completed .step-indicator {
    border-color: var(--success-color);
    background: var(--success-color);
    color: #fff;
}

.step-content {
    flex: 1;
    text-align: left;
}

.step-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.step-detail {
    font-size: 0.8rem;
    color: #6c757d;
}

.progress-step.active .step-label {
    color: var(--secondary-color);
}

.progress-step.completed .step-label {
    color: var(--success-color);
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(78, 205, 196, 0); }
}

/* === ALERT OVERLAY === */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.alert-overlay.show {
    display: flex;
}

.alert-box {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    animation: pulse 1s infinite;
    border: 5px solid var(--primary-color);
    width: 85%;
    max-width: 500px;
}

.alert-box h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
}

.alert-box p {
    font-size: 1.5rem;
    margin: 1rem 0 0 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 20px rgba(255, 107, 107, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* === NAV LINKS === */
.nav-links {
    margin-bottom: 1rem;
    padding: 10px;
    background: #fff;
    border-radius: var(--radius);
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    margin: 0 10px;
    font-weight: 600;
    display: inline-block;
    padding: 5px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    min-width: 300px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* === FOOTER === */
.main-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 0.85rem;
    color: var(--dark-color);
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* === RAINBOW TEXT === */
@keyframes rainbow-text-animation {
    0% { color: #e81416; }
    14% { color: #ffa500; }
    28% { color: #faeb36; }
    42% { color: #79c314; }
    57% { color: #487de7; }
    71% { color: #4b369d; }
    85% { color: #70369d; }
    100% { color: #e81416; }
}

.rainbow-text {
    font-weight: bold;
    animation: rainbow-text-animation 4s infinite linear;
}

/* === BLINK ANIMATION === */
.blink-anim {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* === INFO BOX === */
.info-box {
    font-size: 0.85rem;
    color: #555;
    background: var(--warning-bg);
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--warning-border);
    margin: 10px 0;
}

.info-box strong {
    color: var(--warning-color);
}

/* === CONTENT PAGE STYLES === */
.content-page {
    text-align: left;
    line-height: 1.8;
}

.content-page h3 {
    color: var(--dark-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 8px;
    margin-top: 1.5rem;
}

.content-page p {
    margin: 0.8rem 0;
}

.content-page ul, .content-page ol {
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}

.content-page li {
    margin: 0.4rem 0;
}

.content-page .highlight-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary-color);
    margin: 15px 0;
}

/* === FAQ/ACCORDION === */
.faq-item {
    border: 1px solid #e9ecef;
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question .faq-icon {
    transition: transform 0.3s;
    font-size: 1.2rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fff;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 500px;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 600px) {
    body {
        background-attachment: fixed;
    }

    .container {
        padding: 1rem;
        margin-top: 0.5rem;
        width: 95%;
        border-radius: 15px;
    }

    h1 { font-size: 1.2rem; margin: 0.3em 0; }
    h2 { font-size: 1rem; }
    h3 { font-size: 0.95rem; }

    .big-input {
        font-size: 1.8rem !important;
        letter-spacing: 8px !important;
        padding: 12px !important;
        text-align: center;
    }

    label {
        font-size: 0.85rem;
        text-align: center;
        display: block;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    button, .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
    }

    .checkbox-group {
        padding: 10px;
        margin: 0.5rem 0;
        gap: 10px;
    }

    .checkbox-group label {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .checkbox-group.confirm-checkbox {
        padding: 10px;
    }

    .info-box {
        font-size: 0.8rem;
        padding: 10px;
    }

    .msg {
        padding: 12px;
        font-size: 0.9rem;
    }

    .progress-steps {
        padding: 10px;
    }

    .progress-step {
        gap: 8px;
        padding: 8px 0;
    }

    .step-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.85rem;
    }

    .step-detail {
        font-size: 0.75rem;
    }

    .nav-links {
        padding: 8px;
        margin-bottom: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }

    .nav-links a {
        margin: 0;
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .main-footer {
        padding: 15px 10px 20px;
        font-size: 0.75rem;
    }

    .footer-links {
        gap: 10px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .call-btn {
        padding: 15px !important;
        font-size: 1.1rem !important;
    }

    .home-container {
        padding: 0.8rem 1rem;
        margin: 1vh auto;
    }

    .logo-area img {
        max-width: 55px;
    }

    .card-overlay {
        padding: 10px;
    }

    .card-wrapper {
        padding: 12px;
        max-width: 95%;
    }

    .student-card {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 395 / 240;
    }

    .card-header h2 {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .card-footer {
        font-size: 0.55rem;
        padding: 4px 10px;
    }

    .card-photo {
        width: 50px;
        height: 50px;
    }

    .card-no-photo {
        width: 50px;
        height: 50px;
    }

    .card-name {
        font-size: 0.65rem;
    }

    .card-class {
        font-size: 0.55rem;
    }

    /* SSS Sayfası */
    .faq-question {
        padding: 12px;
        font-size: 0.9rem;
    }

    .faq-answer {
        padding: 0 12px;
        font-size: 0.85rem;
    }

    .faq-item.active .faq-answer {
        padding: 12px;
    }

    /* Table */
    table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 8px 6px;
        font-size: 0.8rem;
        min-width: 80px;
    }

    .class-header {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .student-thumb {
        padding: 10px;
    }

    .student-thumb img,
    .student-thumb .no-photo {
        width: 60px;
        height: 60px;
    }

    .student-thumb h3 {
        font-size: 0.85rem;
    }

    .student-thumb p {
        font-size: 0.75rem;
    }
}

/* === PRINT STYLES === */
@media print {
    body {
        background: white;
        animation: none;
    }
    .container {
        box-shadow: none;
        margin: 0;
        width: 100%;
    }
    .main-footer {
        display: none;
    }
}
