* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #0d7377;
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --text-light: #333;
    --text-dark: #e0e0e0;
    --border-light: #e0e0e0;
    --border-dark: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.navbar {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

body.dark-mode .navbar {
    background: #222;
    border-bottom-color: var(--border-dark);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--secondary-color);
}

.nav-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: var(--border-light);
}

body.dark-mode .nav-btn:hover {
    background: var(--border-dark);
}

.sidebar {
    position: fixed;
    left: -300px;
    top: 60px;
    width: 300px;
    height: calc(100vh - 60px);
    background: var(--bg-light);
    border-right: 1px solid var(--border-light);
    padding: 20px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 99;
}

body.dark-mode .sidebar {
    background: #222;
    border-right-color: var(--border-dark);
}

.sidebar.active {
    left: 0;
}

.sidebar-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.sidebar-content ul {
    list-style: none;
}

.sidebar-content li {
    margin-bottom: 8px;
}

.sidebar-content a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

body.dark-mode .sidebar-content a {
    color: var(--text-dark);
}

.sidebar-content a:hover {
    background: var(--border-light);
}

body.dark-mode .sidebar-content a:hover {
    background: var(--border-dark);
}

.sidebar hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid var(--border-light);
}

body.dark-mode .sidebar hr {
    border-top-color: var(--border-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--border-light);
    animation: fadeIn 0.6s ease;
}

body.dark-mode header {
    border-bottom-color: var(--border-dark);
}

header h1 {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 700;
}

body.dark-mode header h1 {
    color: var(--text-dark);
}

.subtitle {
    font-size: 20px;
    color: #666;
    font-weight: 300;
}

body.dark-mode .subtitle {
    color: #aaa;
}

main {
    margin-bottom: 60px;
}

.welcome-section {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 50px;
    text-align: center;
    animation: slideUp 0.6s ease;
}

body.dark-mode .welcome-section {
    background: #2a2a2a;
}

.welcome-text {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

body.dark-mode .welcome-text {
    color: #bbb;
}

.welcome-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.welcome-text a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.stats-section {
    margin-bottom: 50px;
}

.stats-section h2 {
    font-size: 28px;
    color: var(--text-light);
    margin-bottom: 30px;
    text-align: center;
}

body.dark-mode .stats-section h2 {
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.controls-section {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 250px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

body.dark-mode .search-bar input {
    background: #2a2a2a;
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-controls select {
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

body.dark-mode .filter-controls select {
    background: #2a2a2a;
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.projects-section {
    margin-top: 50px;
}

.projects-section h2,
.favorites-section h2,
.timeline-section h2 {
    font-size: 32px;
    color: var(--text-light);
    margin-bottom: 30px;
    text-align: center;
}

body.dark-mode .projects-section h2,
body.dark-mode .favorites-section h2,
body.dark-mode .timeline-section h2 {
    color: var(--text-dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease;
}

body.dark-mode .project-card {
    background: #2a2a2a;
    border-color: var(--border-dark);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.project-version {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

body.dark-mode .project-version {
    background: linear-gradient(135deg, #0088ff, #00a8a8);
}

.project-badge-tag {
    display: inline-block;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

body.dark-mode .project-badge-tag {
    background: linear-gradient(135deg, #48bb78, #2f855a);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 10px;
    word-break: break-word;
}

body.dark-mode .project-content h3 {
    color: var(--text-dark);
}

.project-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    word-break: break-word;
}

body.dark-mode .project-content p {
    color: #aaa;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    color: #999;
}

.project-rating {
    color: #ffc107;
    font-weight: 600;
}

.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-visit {
    background: var(--primary-color);
    color: white;
}

.btn-visit:hover {
    background: #0052a3;
}

.btn-favorite {
    background: #f0f0f0;
    color: #333;
}

body.dark-mode .btn-favorite {
    background: #333;
    color: #e0e0e0;
}

.btn-favorite:hover {
    background: #ffc107;
    color: #333;
}

.btn-favorite.active {
    background: #ffc107;
    color: #333;
}

.btn-rate {
    background: #48bb78;
    color: white;
}

.btn-rate:hover {
    background: #38a169;
}

.btn-comment {
    background: #667eea;
    color: white;
}

.btn-comment:hover {
    background: #5568d3;
}

.btn-qr {
    background: #ed8936;
    color: white;
}

.btn-qr:hover {
    background: #dd6b20;
}

.btn-share {
    background: #38b6ff;
    color: white;
}

.btn-share:hover {
    background: #0099ff;
}

.project-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.project-link:hover {
    background: #0052a3;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 20px;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 30px;
    animation: slideIn 0.6s ease;
}

.timeline-marker {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

body.dark-mode .timeline-content {
    background: #2a2a2a;
}

.timeline-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
}

body.dark-mode .timeline-title {
    color: var(--text-dark);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

body.dark-mode .modal-content {
    background: #2a2a2a;
    color: var(--text-dark);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

body.dark-mode .modal-close:hover {
    color: #e0e0e0;
}

.modal-content h2 {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 24px;
}

body.dark-mode .modal-content h2 {
    color: var(--text-dark);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-option {
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

body.dark-mode .link-option {
    border-color: var(--border-dark);
}

.link-option:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
    transform: translateX(5px);
}

body.dark-mode .link-option:hover {
    background: #333;
}

.link-option-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.link-option-desc {
    font-size: 14px;
    color: #666;
}

body.dark-mode .link-option-desc {
    color: #aaa;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

body.dark-mode .search-input {
    background: #333;
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-mode .search-result {
    background: #333;
}

.search-result:hover {
    background: var(--primary-color);
    color: white;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.filter-options label:hover {
    background: #f0f0f0;
}

body.dark-mode .filter-options label:hover {
    background: #333;
}

.filter-options input {
    margin-right: 10px;
    cursor: pointer;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-btn {
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.rating-stars {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.star {
    font-size: 40px;
    cursor: pointer;
    color: #ddd;
    transition: all 0.3s ease;
}

.star:hover,
.star.active {
    color: #ffc107;
    transform: scale(1.2);
}

.comment-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 14px;
}

body.dark-mode .comment-input {
    background: #333;
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-submit:hover {
    background: #0052a3;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

body.dark-mode .comment {
    background: #333;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 12px;
}

.comment-text {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

body.dark-mode .comment-text {
    color: #aaa;
}

.comment-date {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

footer {
    text-align: center;
    padding-top: 40px;
    border-top: 2px solid var(--border-light);
    color: #999;
    font-size: 14px;
}

body.dark-mode footer {
    border-top-color: var(--border-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .welcome-section {
        padding: 25px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls-section {
        flex-direction: column;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-controls select {
        width: 100%;
    }
}