/* ===================================
   B2 Exam - External Styles
   =================================== */

/* Basic Layout */
body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    background-color: #e0e0e0; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
}

/* Header */
.header-top { 
    background-color: #1a2a44; 
    color: white; 
    padding: 10px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 4px solid #cc0000; 
}

.logo-box { 
    background-color: white; 
    color: #1a2a44; 
    padding: 5px 15px; 
    font-weight: bold; 
    border-radius: 4px; 
    text-transform: uppercase; 
}

.info-top { 
    text-align: right; 
    font-size: 14px; 
}

.timer-highlight { 
    color: #ffcc00; 
    font-weight: bold; 
    font-size: 16px; 
}

/* Buttons */
.btn-blue { 
    background-color: #0056b3; 
    color: white; 
    border: none; 
    padding: 5px 15px; 
    border-radius: 4px; 
    cursor: pointer; 
    margin-left: 10px; 
    font-weight: bold; 
    text-decoration: none; 
    font-size: 12px;
}

.btn-blue:hover {
    background-color: #003d82;
}

.btn-green {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
}

.btn-green:hover {
    background-color: #218838;
}

.btn-green:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Main Content */
.main-content { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
    padding: 15px; 
    gap: 15px; 
}

.task-side { 
    width: 45%; 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    overflow-y: auto; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    line-height: 1.5; 
    font-size: 13.5px; 
}

.writing-side { 
    width: 55%; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

/* Textarea */
.textarea-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea { 
    flex: 1; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #38055f; 
    font-size: 16px; 
    line-height: 1.6; 
    resize: none; 
    outline: none; 
    font-family: Arial, sans-serif;
}

/* Word Counter */
.word-counter { 
    background: #1a2a44; 
    color: white; 
    padding: 8px 15px; 
    border-radius: 5px; 
    font-weight: bold; 
    display: flex; 
    gap: 15px; 
    align-items: center;
    justify-content: space-between;
}

.counter-left {
    display: flex;
    gap: 15px;
}

/* Ad Boxes */
.ad-full { 
    border: 2px solid #333; 
    padding: 15px; 
    background: #fff; 
    margin: 10px 0; 
}

.yellow-box { 
    background-color: #ffffcc; 
    border: 1px solid #e6e600; 
    padding: 10px; 
    margin-bottom: 15px; 
    font-size: 13px; 
    border-radius: 5px; 
    font-weight: bold; 
}

/* ===================================
   Correction Panel Styles
   =================================== */

.correction-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
}

.correction-panel.show {
    display: block;
}

.correction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a2a44;
}

.correction-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a2a44;
}

.close-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.close-btn:hover {
    background: #c82333;
}

.correction-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.summary-label {
    font-weight: bold;
    color: #495057;
}

.summary-value {
    color: #1a2a44;
    font-weight: bold;
}

.error-item {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.error-type {
    font-weight: bold;
    color: #856404;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.error-message {
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.error-context {
    background: white;
    padding: 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 13px;
}

.error-word {
    background: #ff6b6b;
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.suggestion {
    background: #d4edda;
    color: #155724;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0056b3;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-errors {
    text-align: center;
    padding: 30px;
    color: #28a745;
    font-size: 16px;
}

.no-errors::before {
    content: "✓";
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

.score-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.notification.show {
    display: block;
}

.notification.error {
    background: #dc3545;
}

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