
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ff7d7d;
    --accent-color: #00ff77;
    --light-text-color: #ffffff;
    --dark-text-color: #000000;
    
    /* RGB versions for transparency */
    --primary-color-rgb: 26, 26, 26;
    --secondary-color-rgb: 255, 125, 125;
    --light-text-color-rgb: 255, 255, 255;
    
    /* Additional colors */
    --card-gradient-start: #2a2a2a;
    --card-gradient-end: #1e1e1e;
    --border-color: #404040;
    --hover-shadow: rgba(0, 0, 0, 0.3);
    --gradient-bg: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    
    /* Missing colors for dropdown functionality */
    --error-color: #ff4757;
    --dark-bg-color: #2a2a2a;
    --success-color: #00ff77;
}

/* SVG Icon Styles */
.nav-icon, .btn-icon, .hero-icon, .option-icon, .menu-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    fill: currentColor;
}

.hero-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.btn-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.btn-icon-profile {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.menu-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.card-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    fill: currentColor;
}

.category-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    fill: currentColor;
}

.featured-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    fill: currentColor;
}

body {
    background: var(--gradient-bg);
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* padding: 90px 20px 20px 20px; Top padding for fixed navbar */
    color: var(--light-text-color);
    position: relative;
}

footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.footer-left {
    flex: 1;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-social {
        order: -1;
    }
}

.filter-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 16px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

#search-bar, #category-filter, #sort-filter {
    padding: 15px 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--light-text-color);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 200px;
    font-weight: 500;
    box-sizing: border-box;
}

#search-bar {
    flex: 2;
    min-width: 250px;
    max-width: none;
}

#category-filter, #sort-filter {
    flex: 1;
    min-width: 180px;
    max-width: none;
}

#category-filter option, #sort-filter option {
    background: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px;
    border: none;
}

#search-bar:focus, #category-filter:focus, #sort-filter:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 119, 0.2);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

#search-bar::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Filter section responsive design */
@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        position: relative;
        z-index: 1;
    }
    
    #search-bar, #category-filter, #sort-filter {
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
        padding: 12px 16px;
        font-size: 0.95rem;
        flex: none !important;
    }
    
    .header-section {
        padding: 15px 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* Additional mobile improvements */
@media (max-width: 480px) {
    .filter-section {
        padding: 15px;
        margin: 20px 10px;
        z-index: 1;
    }
    
    #search-bar, #category-filter, #sort-filter {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
        flex: none !important;
    }
    
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .header-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .button-row {
        flex-direction: column;
        gap: 10px;
    }

    .main-button {
        padding: 10px 20px;
    }

    .addon-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}


.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 30px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.logo-link {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0 auto;
    letter-spacing: -0.02em;
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* h1::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #4ade80, transparent);
    margin: 15px auto 0;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 255, 119, 0.3);
} */

.button-row {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    min-height: 50px;
    padding: 10px 0;
    z-index: 100000;
}

.main-button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 24px;
    min-width: 90px;
    max-width: 180px;
    height: 45px;
    box-sizing: border-box;
    border: 2px solid var(--light-text-color);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-family: 'Minecraft', monospace;
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.main-button:hover {
    background-color: var(--light-text-color);
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
}

/* Auth button styling for header */
.auth-btn, .logout-btn, .login-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 16px;
    min-width: 80px;
    max-width: 120px;
    font-size: 13px;
    font-family: 'Minecraft', monospace;
    box-sizing: border-box;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Minecraft', monospace;
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-btn:hover, .logout-btn:hover, .login-button:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.logout-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.big-button {
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    color: var(--light-text-color);
    padding: 20px;
    border: 2px solid var(--light-text-color);
    text-align: center;
    font-size: large;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    text-decoration: none;
}

.big-button img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 10px;
}

.big-button:hover {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    transform: scale(1.05) rotate(2deg);
}

/* Interactive addon card elements */
.addon-card__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.addon-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: var(--light-text-color);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    min-width: 45px;
    justify-content: center;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

.addon-card__stat:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 119, 0.25);
}

.addon-card__stat.liked {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    border-color: #ff5252;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.addon-card__stat.liked:hover {
    background: linear-gradient(135deg, #ff5252, #ff3030);
    box-shadow: 0 4px 16px rgba(255, 82, 82, 0.4);
    transform: translateY(-2px);
}

.addon-card__stat svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.addon-card__stat:hover svg {
    transform: scale(1.15);
}

.addon-card__download-count {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-left: auto;
    padding: 6px 10px;
    background: rgba(0, 255, 119, 0.1);
    border: 1px solid rgba(0, 255, 119, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

/* Prevent interaction elements from triggering card click */
.addon-card__stats * {
    pointer-events: auto;
}

.big-button .addon-card__stats {
    pointer-events: none;
}

.big-button .addon-card__stat {
    pointer-events: auto;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .addon-card__stats {
        gap: 6px;
        margin-top: 10px;
    }
    
    .addon-card__stat {
        padding: 5px 8px;
        font-size: 0.75rem;
        min-width: 40px;
        gap: 4px;
    }
    
    .addon-card__stat svg {
        width: 12px;
        height: 12px;
    }
    
    .addon-card__download-count {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

.main-button:hover, .main-button.active {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    transform: scale(1.1);
}

/* Global avatar size constraints */
img[alt*="Avatar"], img[alt*="avatar"], .user-avatar, .avatar {
    max-width: 128px !important;
    max-height: 128px !important;
    object-fit: cover !important;
}

/* Settings 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.8);
    transition: opacity 0.2s ease-in-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    width: 95%;
    max-width: 800px; /* Increased from 500px for better desktop experience */
    max-height: 90vh; /* Increased from 80vh for more content space */
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--accent-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.5em;
}

.close {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ff4444;
}

.modal-body {
    padding: 20px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.setting-item label {
    font-weight: bold;
    color: var(--light-text-color);
    font-size: 0.9em;
}

.setting-item input {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background: var(--primary-color);
    color: var(--light-text-color);
    font-family: system-ui, -apple-system, sans-serif;
}

.setting-item input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 255, 119, 0.3);
}

.action-btn, .danger-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    align-self: flex-start;
}

.action-btn {
    background: var(--accent-color);
    color: var(--dark-text-color);
}

.action-btn:hover {
    background: #00cc5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 119, 0.3);
}

.danger-btn {
    background: var(--secondary-color);
    color: var(--light-text-color);
}

.danger-btn:hover {
    background: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.setting-description {
    font-size: 0.8em;
    color: #cccccc;
    font-style: italic;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10px;
        max-width: none; /* Remove max-width constraint on mobile */
    }
    
    .setting-item {
        padding: 10px;
    }
}

/* Desktop-specific modal improvements */
@media (min-width: 1024px) {
    .modal-content {
        width: 70%; /* Smaller percentage on larger screens */
        max-width: 900px; /* Larger max-width for desktop */
    }
}

@media (min-width: 1440px) {
    .modal-content {
        width: 60%; /* Even smaller percentage on very large screens */
        max-width: 1000px;
    }
}

/* AdSense Styling */
.ad-section {
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.5) 0%, rgba(30, 30, 30, 0.5) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.ad-container .adsbygoogle {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.ad-container::before {
    content: "Advertisement";
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive ad styling */
@media (max-width: 768px) {
    .ad-section {
        padding: 15px 0;
        margin: 15px 0;
    }
    
    .ad-container {
        padding: 0 15px;
    }
}

/* In-content ad styling */
.ad-inline {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.ad-inline::before {
    content: "Sponsored";
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
