/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header h1 i {
    color: #3498db;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form section */
.form-section, .notes-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-section h2, .notes-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="text"],
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8fbff;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background: #eef6ff;
}

.file-upload-area input[type="file"] {
    border: none;
    background: transparent;
    padding: 10px;
}

.file-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.file-info.has-file {
    color: #27ae60;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(52, 152, 219, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Notes table */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.notes-table-container {
    overflow-x: auto;
}

.notes-table {
    width: 100%;
    border-collapse: collapse;
}

.notes-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.notes-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.notes-table tbody tr:hover {
    background: #f8f9fa;
}

/* Language tag */
.language-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Priority badges */
.priority-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.priority-1, .priority-2 { background: #e8f5e9; color: #2e7d32; }
.priority-3, .priority-4 { background: #fff3e0; color: #ef6c00; }
.priority-5, .priority-6 { background: #fff8e1; color: #ff8f00; }
.priority-7, .priority-8 { background: #ffebee; color: #c62828; }
.priority-9, .priority-10 { background: #fce4ec; color: #ad1457; }

/* File link */
.file-link {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.file-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Upload status page */
.upload-status {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.status-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.status-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.status-icon.success {
    color: #27ae60;
}

.status-icon.error {
    color: #e74c3c;
}

.status-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.status-message {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #34495e;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.upload-details {
    text-align: left;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.upload-details h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-details ul {
    list-style: none;
}

.upload-details li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.upload-details li:last-child {
    border-bottom: none;
}

/* Priority colors for select dropdown */
select.priority-1, select.priority-2 { color: #2e7d32; }
select.priority-3, select.priority-4 { color: #ef6c00; }
select.priority-5, select.priority-6 { color: #ff8f00; }
select.priority-7, select.priority-8 { color: #c62828; }
select.priority-9, select.priority-10 { color: #ad1457; }

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .form-section, .notes-section {
        padding: 20px;
    }
    
    .status-card {
        padding: 20px;
    }
}


/* ==================== */
/* DISPLAY NOTES STYLES */
/* ==================== */

.display-notes-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Back link */
.back-link {
    margin-top: 15px;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link a:hover {
    background: #e3f2fd;
    color: #2980b9;
}

/* Selection Card */
.selection-card {
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    padding: 20px 30px;
}

.card-header h2 {
    margin: 0;
    color: white;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 30px;
}

/* Language Form */
.language-form .form-group {
    margin-bottom: 0;
}

.select-wrapper {
    position: relative;
}

.language-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    background: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-wrapper.has-selection .language-select {
    border-color: #3498db;
    background: #f8fbff;
}

.select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #7f8c8d;
}

/* Selected Language Info */
.selected-language-info {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.selected-language-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.welcome-icon {
    font-size: 5rem;
    color: #3498db;
    margin-bottom: 20px;
}

.welcome-message h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.welcome-message p {
    color: #7f8c8d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.language-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.stat-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 200px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 10px 0;
}

.stat-card p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.95rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.empty-icon {
    font-size: 5rem;
    color: #ecf0f1;
    margin-bottom: 25px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.empty-state p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Notes Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-header h2 {
    color: #2c3e50;
    margin: 0;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
}

.sort-label {
    color: #7f8c8d;
    font-weight: 500;
}

.sort-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.note-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.note-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.priority-indicator {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.note-id {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.note-card-body {
    padding: 25px;
}

.topic-title {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-title i {
    color: #3498db;
}

.note-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.meta-item i {
    width: 20px;
    color: #95a5a6;
}

.note-actions {
    display: flex;
    gap: 12px;
}

.btn-view, .btn-download {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-download {
    background: #2ecc71;
    color: white;
}

.btn-download:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.summary-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.summary-item i {
    font-size: 2.5rem;
    color: #3498db;
}

.summary-item h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.summary-value {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.priority-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.priority-stat-item {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Priority Colors (Extended) */
.priority-1, .priority-2 { 
    background: #e8f5e9; 
    color: #2e7d32; 
    border: 1px solid #c8e6c9;
}
.priority-3, .priority-4 { 
    background: #fff3e0; 
    color: #ef6c00; 
    border: 1px solid #ffe0b2;
}
.priority-5, .priority-6 { 
    background: #fff8e1; 
    color: #ff8f00; 
    border: 1px solid #ffecb3;
}
.priority-7, .priority-8 { 
    background: #ffebee; 
    color: #c62828; 
    border: 1px solid #ffcdd2;
}
.priority-9, .priority-10 { 
    background: #fce4ec; 
    color: #ad1457; 
    border: 1px solid #f8bbd9;
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */

@media (max-width: 992px) {
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .language-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .selection-card, .welcome-message, .empty-state {
        margin: 20px 0;
        padding: 20px;
    }
    
    .card-header, .card-body {
        padding: 20px;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        align-self: stretch;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .note-actions {
        flex-direction: column;
    }
    
    .btn-view, .btn-download {
        width: 100%;
    }
    
    .welcome-icon, .empty-icon {
        font-size: 4rem;
    }
    
    .stat-card {
        padding: 20px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .back-link {
        text-align: center;
    }
    
    .note-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .priority-stats {
        flex-direction: column;
    }
    
    .priority-stat-item {
        text-align: center;
    }
}

/* Animation for note cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.note-card:nth-child(1) { animation-delay: 0.1s; }
.note-card:nth-child(2) { animation-delay: 0.2s; }
.note-card:nth-child(3) { animation-delay: 0.3s; }
.note-card:nth-child(4) { animation-delay: 0.4s; }
.note-card:nth-child(5) { animation-delay: 0.5s; }
.note-card:nth-child(6) { animation-delay: 0.6s; }
.note-card:nth-child(n+7) { animation-delay: 0.7s; }