body {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
}

.search-container {
    max-width: 500px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.search-container h4 {
    color: #11998e;
    font-weight: 800;
}

#documentArea {
    display: none;
}

.document {
    width: 210mm;
    min-height: auto;
    background: white;
    margin: 30px auto;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.doc-header {
    background: linear-gradient(135deg, #1a1c2c 0%, #2d3154 100%);
    color: white;
    padding: 15px 25px;
    text-align: center;
    border-bottom: 4px solid #11998e;
}

.doc-header h3 {
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
    font-size: 1.3rem;
}

.doc-header p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.85rem;
}

.doc-subtitle {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 2px;
    border-bottom: 3px solid #4a5568;
}

.doc-body {
    padding: 15px 20px;
}

/* Bilgi Tablosu - Kılavuz çizgili */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 2px solid #2d3154;
    border-radius: 8px;
    overflow: hidden;
}

.info-table td {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
}

.info-table .label {
    background: linear-gradient(135deg, #f0f2f5, #e4e7ec);
    font-weight: 700;
    width: 30%;
    color: #2d3154;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-right: 2px solid #2d3154;
}

.info-table .value {
    font-weight: 700;
    color: #1a1c2c;
}

/* Puan ve Sıralama Kutuları */
.score-container {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.score-box {
    flex: 1;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.score-box.puan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.score-box.siralama {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.3);
}

.score-box span {
    font-size: 0.8rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.score-box strong {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Ders Bazlı Sonuçlar */
.subject-section {
    margin-bottom: 12px;
}

.subject-section h6 {
    font-weight: 700;
    color: #2d3154;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subject-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border: 2px solid #2d3154;
    border-radius: 8px;
    overflow: hidden;
}

.subject-table th {
    background: linear-gradient(135deg, #2d3154, #1a1c2c);
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.subject-table th:last-child {
    border-right: none;
}

.subject-table td {
    padding: 7px 10px;
    border: 1px solid #dee2e6;
    text-align: center;
    font-weight: 600;
}

.subject-table tr:nth-child(even) {
    background: #f8f9fc;
}

.subject-table tr:hover {
    background: #eef0f7;
}

.subject-table .subject-name {
    text-align: left;
    font-weight: 700;
    color: #2d3154;
    border-right: 2px solid #2d3154;
}

.subject-table .correct {
    color: #0d8a3e;
    font-weight: 800;
}

.subject-table .wrong {
    color: #dc3545;
    font-weight: 800;
}

.subject-table .blank {
    color: #6c757d;
    font-weight: 600;
}

.subject-table .net {
    color: #4a47c9;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Toplam Satırı */
.subject-table .toplam-row td {
    background: linear-gradient(135deg, #2d3154, #1a1c2c) !important;
    color: white !important;
    font-weight: 800;
    border-top: 2px solid #2d3154;
    font-size: 0.9rem;
}

.subject-table .toplam-row .subject-name {
    color: white;
    border-right-color: rgba(255, 255, 255, 0.2);
}

.subject-table .toplam-row .correct {
    color: #86efac;
}

.subject-table .toplam-row .wrong {
    color: #fca5a5;
}

.subject-table .toplam-row .blank {
    color: #d1d5db;
}

.subject-table .toplam-row .net {
    color: #93c5fd;
    font-size: 1rem;
}

/* Sonuç Durumu */
.status-box {
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.status-kazandi {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.3);
}

.status-yedek {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: #333;
    box-shadow: 0 6px 20px rgba(247, 151, 30, 0.3);
    text-shadow: none;
}

.status-kazanamadi {
    background: linear-gradient(135deg, #cb2d3e 0%, #ef473a 100%);
    box-shadow: 0 6px 20px rgba(203, 45, 62, 0.3);
}

.doc-footer {
    background: linear-gradient(135deg, #f0f2f5, #e4e7ec);
    padding: 12px 25px;
    text-align: center;
    font-size: 0.75rem;
    color: #555;
    font-weight: 600;
    border-top: 2px solid #2d3154;
}

.btn-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-actions button {
    margin: 0 5px;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 5mm;
    }

    body {
        background: white !important;
        min-height: auto !important;
    }

    .search-container,
    .btn-actions,
    nav,
    #searchArea,
    #msgBox {
        display: none !important;
    }

    #documentArea {
        display: block !important;
    }

    .document {
        position: relative;
        margin: 0;
        padding: 0;
        box-shadow: none;
        width: 100%;
        min-height: auto;
        border: 1px solid #999;
        page-break-after: avoid;
        page-break-inside: avoid;
        overflow: visible;
    }

    .doc-header {
        padding: 5px 15px;
    }

    .doc-header h3 {
        font-size: 1rem;
    }

    .doc-header p {
        font-size: 0.7rem;
        margin: 2px 0 0 0;
    }

    .doc-subtitle {
        padding: 4px;
        font-size: 0.85rem;
    }

    .doc-body {
        padding: 5px 10px;
    }

    .info-table {
        margin-bottom: 5px;
        font-size: 0.75rem;
    }

    .info-table td {
        padding: 3px 8px;
    }

    .score-container {
        gap: 5px;
        margin-bottom: 5px;
    }

    .score-box {
        padding: 5px;
    }

    .score-box span {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }

    .score-box strong {
        font-size: 1.3rem;
    }

    .subject-section {
        margin-bottom: 5px;
    }

    .subject-section h6 {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }

    .subject-table th {
        padding: 3px 4px;
        font-size: 0.65rem;
    }

    .subject-table td {
        padding: 2px 4px;
        font-size: 0.7rem;
    }

    .status-box {
        padding: 8px;
        font-size: 0.9rem;
    }

    .doc-footer {
        padding: 5px 10px;
        font-size: 0.6rem;
    }

    .doc-contact-footer {
        margin-top: 5px !important;
        padding-top: 5px !important;
        font-size: 0.6rem !important;
    }

    .doc-header,
    .doc-subtitle,
    .info-table .label,
    .subject-table th,
    .subject-table .toplam-row td,
    .score-box,
    .status-box,
    .doc-footer {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 768px) {
    .document {
        width: auto;
        min-height: auto;
        margin: 10px;
        border-radius: 12px;
    }

    .doc-header {
        padding: 15px;
    }

    .doc-header h3 {
        font-size: 1.1rem;
    }

    .doc-body {
        padding: 15px;
    }

    .info-table .label {
        font-size: 0.7rem;
        padding: 8px 10px;
    }

    .info-table .value {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .score-container {
        flex-direction: column;
    }

    .score-box strong {
        font-size: 1.8rem;
    }

    .subject-table {
        font-size: 0.75rem;
    }

    .subject-table th,
    .subject-table td {
        padding: 7px 5px;
    }

    .status-box {
        font-size: 1.1rem;
        padding: 14px;
    }

    .doc-footer {
        padding: 10px 15px;
        font-size: 0.7rem;
    }
}