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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dark-mode .container {
    background: #2c3e50;
    color: white;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Position Selector Section */
.position-selector-section {
    background: #f8f9fa;
    padding: 20px 40px;
    border-bottom: 1px solid #dee2e6;
}

body.dark-mode .position-selector-section {
    background: #34495e;
    border-bottom-color: #4a6741;
}

.position-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.position-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.position-dropdown label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

body.dark-mode .position-dropdown label {
    color: white;
}

.position-select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    min-width: 250px;
    transition: all 0.3s ease;
}

body.dark-mode .position-select {
    background: #2c3e50;
    color: white;
    border-color: #4a6741;
}

.position-select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.position-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.compare-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.export-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.settings-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 40px;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2a5298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* No Position Selected */
.no-position-selected {
    padding: 60px 40px;
    text-align: center;
}

.empty-state h2 {
    color: #2a5298;
    margin-bottom: 15px;
    font-size: 1.8em;
}

body.dark-mode .empty-state h2 {
    color: #74b9ff;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1em;
    margin-bottom: 40px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Position Info Header */
.position-info-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 40px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

body.dark-mode .position-info-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-bottom-color: #4a6741;
}

.position-title h2 {
    color: #1e3c72;
    font-size: 1.8em;
    margin-bottom: 8px;
}

body.dark-mode .position-title h2 {
    color: #74b9ff;
}

.position-title p {
    color: #6c757d;
    font-size: 1em;
    line-height: 1.5;
}

.position-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.meta-label {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2a5298;
}

body.dark-mode .meta-value {
    color: #74b9ff;
}

.content {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    color: #1e3c72;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2a5298;
}

body.dark-mode .section h2 {
    color: #74b9ff;
    border-bottom-color: #74b9ff;
}

.responsibilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.responsibility-category {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border-left: 5px solid #2a5298;
    transition: all 0.3s ease;
}

body.dark-mode .responsibility-category {
    background: #34495e;
    border-left-color: #74b9ff;
}

.responsibility-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.responsibility-category h3 {
    color: #1e3c72;
    font-size: 1.3em;
    margin-bottom: 15px;
}

body.dark-mode .responsibility-category h3 {
    color: #74b9ff;
}

.responsibility-category ul {
    list-style: none;
}

.responsibility-category li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.responsibility-category li:before {
    content: "▶";
    color: #2a5298;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

body.dark-mode .responsibility-category li:before {
    color: #74b9ff;
}

.responsibility-category li:hover:before {
    transform: scale(1.2);
}

.controls {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

body.dark-mode .controls {
    background: #34495e;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

body.dark-mode .filter-group label {
    color: white;
}

select, input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

body.dark-mode select,
body.dark-mode input {
    background: #2c3e50;
    color: white;
    border-color: #4a6741;
}

select:focus, input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.clear-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.dark-mode .scorecard-table {
    background: #2c3e50;
}

.scorecard-table th {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.scorecard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

body.dark-mode .scorecard-table td {
    border-bottom-color: #4a6741;
}

.scorecard-table tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

body.dark-mode .scorecard-table tr:hover {
    background-color: #34495e;
}

.difficulty-1 { background-color: #d4edda; color: #155724; }
.difficulty-2 { background-color: #d1ecf1; color: #0c5460; }
.difficulty-3 { background-color: #fff3cd; color: #856404; }
.difficulty-4 { background-color: #f8d7da; color: #721c24; }
.difficulty-5 { background-color: #f5c6cb; color: #721c24; }

.difficulty-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    min-width: 60px;
    transition: all 0.3s ease;
}

.difficulty-badge:hover {
    transform: scale(1.1);
}

.frequency-daily { color: #dc3545; font-weight: bold; }
.frequency-weekly { color: #fd7e14; font-weight: bold; }
.frequency-monthly { color: #ffc107; font-weight: bold; }
.frequency-yearly { color: #28a745; font-weight: bold; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.stat-card h3 {
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-card p {
    opacity: 0.9;
}

.search-box {
    width: 300px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
}

.table-container {
    max-height: 800px;
    overflow-y: auto;
    border-radius: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 15px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

body.dark-mode .modal-content {
    background-color: #2c3e50;
    color: white;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px 15px 0 0;
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-bottom-color: #4a6741;
}

.modal-header h2 {
    color: #1e3c72;
    margin: 0;
}

body.dark-mode .modal-header h2 {
    color: #74b9ff;
}

.close {
    color: #6c757d;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #dc3545;
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
}

.compare-selector {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 30px;
}

.compare-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compare-item label {
    font-weight: 600;
    color: #333;
}

body.dark-mode .compare-item label {
    color: white;
}

.compare-item select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.comparison-results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
}

body.dark-mode .comparison-results {
    background: #34495e;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: #1e3c72;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2a5298;
}

body.dark-mode .settings-section h3 {
    color: #74b9ff;
    border-bottom-color: #74b9ff;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.file-input {
    flex: 1;
    min-width: 200px;
}

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

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

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .position-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .position-dropdown {
        min-width: auto;
    }
    
    .position-actions {
        justify-content: center;
    }
    
    .position-info-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .position-meta {
        justify-content: space-around;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .search-box {
        width: 100%;
    }
    
    .compare-selector {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
}