/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.language-selector {
    flex-shrink: 0;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.language-selector option {
    background: #667eea;
    color: white;
}

/* Navigation */
nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-language {
    flex-shrink: 0;
}

.nav-language select {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-language select:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.nav-language select:focus {
    outline: none;
    background: #e9ecef;
    border-color: #667eea;
}

.nav-link {
    text-decoration: none;
    color: #333;
    padding: 0.8rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    margin-bottom: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    color: #667eea;
}

.stat-content h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list, .rating-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item, .rating-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.activity-item i, .rating-item i {
    color: #667eea;
}

.activity-item small, .rating-item small {
    color: #666;
    margin-left: auto;
}

/* Search Container */
.search-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-group label {
    font-weight: 600;
    color: #333;
}

.search-group input,
.search-group select {
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: #667eea;
}

.search-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Search Results */
.search-results {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.result-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.3s ease;
}

.result-item:hover {
    background-color: #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.result-category {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 1rem;
}

.result-id {
    color: #666;
    font-size: 0.9rem;
}

.result-content {
    margin-bottom: 1rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

/* Rating Form */
.rating-form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.rating-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover {
    color: #ffc107;
}

.form-actions {
    margin-top: 1rem;
}

/* Documentation */
.documentation-upload {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.documentation-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Charts */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-bottom: 1rem;
    color: #333;
}

.chart-container canvas {
    max-height: 300px;
}

/* Tables */
.statistics-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}

.table-container {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table-container h3 {
    margin-bottom: 1rem;
    color: #333;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Smooth scrolling und Hash-Navigation */
html {
    scroll-behavior: smooth;
}

/* Offset für Sticky-Header */
[id] {
    scroll-margin-top: 80px;
}

/* Hash-Navigation Highlight */
section:target {
    background-color: rgba(0, 255, 136, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin: -10px;
}
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        margin: 0.2rem 0;
    }
    
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
    }
    
    .statistics-tables {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .result-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Ratings Display */
.ratings-display, .documentation-display {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rating-item, .documentation-item {
    padding: 1rem;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.rating-item:last-child, .documentation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rating-header, .documentation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rating-element, .documentation-title {
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
}

.rating-score {
    color: #ffc107;
    font-size: 1.2rem;
    font-weight: bold;
}

.rating-date, .documentation-date {
    color: #666;
    font-size: 0.9rem;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.rating-content {
    margin-top: 0.8rem;
}

.rating-comment, .documentation-content {
    margin-top: 0.5rem;
    color: #555;
    line-height: 1.5;
    background: white;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #e1e5e9;
}

.rating-emotion {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #667eea;
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.rating-suggestion {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    font-style: italic;
}

.rating-docs {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    color: #004085;
    font-size: 0.9rem;
}

/* Dashboard Rating List */
#ratingList {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

#ratingList .rating-item {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: white;
    border-left: 3px solid #667eea;
}

#ratingList .rating-item:last-child {
    margin-bottom: 0;
}

/* Form Styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group label input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Additional responsive improvements */
@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}
