/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Dark Mode (Default) */
.dark-mode {
    background-color: #000;
    color: #fff;
}

.dark-mode .header,
.dark-mode .footer {
    background-color: #333;
}

.dark-mode a {
    color: #ffd700;
}

.dark-mode a:visited {
    color: #b8860b;
}

/* Light Mode */
.light-mode {
    background-color: #fff;
    color: #000;
}

.light-mode .header,
.light-mode .footer {
    background-color: #f5f5f5;
}

.light-mode a {
    color: #ff6600;
}

.light-mode a:visited {
    color: #cc5200;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 1rem 0;
    border-bottom: 1px solid #444;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.light-mode .navbar-brand:hover {
    background-color: rgba(255, 102, 0, 0.1);
}

.navbar-brand a {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    gap: 20px;
}

.navbar-nav a {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navbar-nav a:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

/* Search */
.search-container {
    text-align: center;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #222;
    color: #fff;
}

.light-mode .search-input {
    background-color: #fff;
    color: #000;
    border-color: #ddd;
}

.search-button {
    padding: 10px 20px;
    background-color: #ffd700;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #ffed4a;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Messages */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.alert {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #28a745;
    color: white;
}

.alert-error {
    background-color: #dc3545;
}

.alert-warning {
    background-color: #ffc107;
    color: #000;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background-color: #ffd700;
    color: #000;
}

.dark-mode a.btn-primary,
.dark-mode a.btn-primary:visited,
.dark-mode a.btn-primary:hover {
    color: #000;
}

.btn-primary:hover {
    background-color: #ffed4a;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-outline {
    border: 2px solid #ffd700;
    color: #ffd700;
    background-color: transparent;
}

.btn-outline:hover {
    background-color: #ffd700;
    color: #000;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: #4285f4;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-google:hover {
    background-color: #3367d6;
    color: #fff;
}

.btn-small {
    padding: 4px 12px;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 8px;
    display: inline-block;
}

.btn-outline.btn-full {
    margin-bottom: 1rem;
}

/* Theme Toggle */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: 2px solid #ffd700;
    color: #ffd700;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.theme-toggle-btn:hover {
    background-color: #ffd700;
    color: #000;
}

.light-mode .theme-toggle-btn {
    border-color: #ff6600;
    color: #ff6600;
}

.light-mode .theme-toggle-btn:hover {
    background-color: #ff6600;
    color: #fff;
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.toggle-text {
    font-weight: 500;
}

.google-icon {
    font-size: 18px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select,
textarea.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #222;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
textarea.form-input:focus {
    outline: none;
    border-color: #ffd700;
}

.light-mode .form-input,
.light-mode .form-select,
.light-mode textarea.form-input {
    background-color: #fff;
    color: #000;
    border-color: #ccc;
}

.light-mode .form-input:focus,
.light-mode .form-select:focus,
.light-mode textarea.form-input:focus {
    border-color: #ff6600;
}

.form-errors {
    margin-top: 0.5rem;
}

.error {
    display: block;
    color: #ff4757;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Homepage */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.recent-mods-section h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.view-more {
    text-align: center;
}

.no-mods {
    text-align: center;
    padding: 3rem 0;
}

.no-content {
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

/* Mods Grid */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.mod-card {
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.light-mode .mod-card {
    border-color: #ddd;
}

.mod-card:hover {
    transform: translateY(-5px);
}

.mod-images {
    position: relative;
}

.mod-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
}

.mod-thumbnails {
    display: flex;
    gap: 5px;
    padding: 10px;
    overflow-x: auto;
}

.mod-thumbnail {
    width: 60px;
    height: 34px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mod-thumbnail:hover {
    opacity: 0.7;
}

.mod-placeholder {
    width: 100%;
    height: 200px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 20px;
}

.light-mode .mod-placeholder {
    background-color: #f0f0f0;
}

.mod-info {
    padding: 15px;
}

.mod-info h3 {
    margin-bottom: 10px;
}

.mod-info h3 a {
    text-decoration: none;
}

.mod-author,
.mod-game,
.mod-date {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.mod-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.mod-views,
.mod-downloads {
    opacity: 0.7;
}

.mod-categories {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.category-tag {
    background-color: #ffd700;
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.light-mode .category-tag {
    background-color: #ff6600;
    color: #fff;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Search Filters */
.search-filters {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 2rem;
}

.light-mode .search-filters {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-input,
.filter-select {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
}

.light-mode .filter-input,
.light-mode .filter-select {
    background-color: #fff;
    color: #000;
    border-color: #ccc;
}

.search-results-count {
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0.8;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

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

.page-info {
    padding: 0 20px;
    font-weight: 500;
}

/* Authentication Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #111;
}

.light-mode .auth-container {
    background-color: #fff;
    border-color: #ddd;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.7;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-links {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-links a {
    color: #ffd700;
    text-decoration: none;
    font-size: 0.9rem;
}

.light-mode .auth-links a {
    color: #ff6600;
}

.auth-links p {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-auth {
    margin-top: 1.5rem;
}

.divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #444;
}

.light-mode .divider::before {
    background-color: #ddd;
}

.divider span {
    background-color: #111;
    padding: 0 1rem;
    font-size: 0.875rem;
    opacity: 0.7;
    position: relative;
}

.light-mode .divider span {
    background-color: #fff;
}

/* Profile Page */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #444;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #ffd700;
    border-bottom: 2px solid #ffd700;
}

.light-mode .tab-button.active {
    color: #ff6600;
    border-bottom-color: #ff6600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.profile-section {
    background-color: #111;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.light-mode .profile-section {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.profile-section h2 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.light-mode .profile-section h2 {
    color: #ff6600;
}

.user-presentation {
    white-space: pre-wrap;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #222;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    background-color: #333;
}

.light-mode .social-link {
    background-color: #e9ecef;
}

.light-mode .social-link:hover {
    background-color: #dee2e6;
}

.social-icon {
    font-size: 1.2em;
    vertical-align: middle;
    margin-right: 5px;
}

.member-since,
.last-login {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Settings Page */
.settings-container {
    max-width: 500px;
}

.settings-nav {
    margin-bottom: 2rem;
}

.settings-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.light-mode .settings-group {
    border-bottom-color: #e9ecef;
}

.settings-group:last-of-type {
    border-bottom: none;
}

.settings-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #ffd700;
    font-weight: 600;
}

.light-mode .settings-subtitle {
    color: #ff6600;
}

.link-separator {
    margin: 0 10px;
    opacity: 0.4;
}

/* Creator Studio */
.creator-studio {
    max-width: 1200px;
    margin: 0 auto;
}

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

.stat-card {
    background-color: #111;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.light-mode .stat-card {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.stat-card h3 {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.light-mode .stat-card h3 {
    color: #ff6600;
}

.mods-section h2 {
    margin-bottom: 1.5rem;
}

.mods-table {
    overflow-x: auto;
    background-color: #111;
    border-radius: 8px;
    padding: 1rem;
}

.light-mode .mods-table {
    background-color: #fff;
    border: 1px solid #ddd;
}

.mods-table table {
    width: 100%;
    border-collapse: collapse;
}

.mods-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #444;
    color: #ffd700;
}

.light-mode .mods-table th {
    border-bottom-color: #ddd;
    color: #ff6600;
}

.mods-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
}

.light-mode .mods-table td {
    border-bottom-color: #eee;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-approved {
    background-color: #28a745;
    color: #fff;
}

.status-rejected {
    background-color: #dc3545;
    color: #fff;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid #444;
    margin-top: auto;
}

.light-mode .footer {
    border-top-color: #ddd;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
}

.footer-text {
    text-align: center;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar-brand a span {
        display: none;
    }
    
    .navbar-brand {
        gap: 0;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Hero */
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Grid */
    .mods-grid {
        grid-template-columns: 1fr;
    }
    
    /* Filters */
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Footer */
    .footer-links {
        gap: 15px;
    }
    
    .theme-toggle-btn {
        order: -1;
        margin-bottom: 10px;
    }
    
    /* Studio */
    .studio-stats {
        grid-template-columns: 1fr;
    }
    
    .mods-table {
        padding: 0.5rem;
    }
    
    .mods-table th,
    .mods-table td {
        padding: 8px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}