/* Additional CSS for Wallpaper Showcase Page - FIXED VERSION */

.container{
    max-width: 1500px;
}

/* Main Wallpaper Showcase - FIXED: Added padding-top to account for fixed navbar */
.wallpaper-showcase {
    padding: 6rem 0 4rem; /* Changed from 2rem to 6rem to account for 70px navbar */
    min-height: 100vh;
}

.wallpaper-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
}

/* Wallpaper Preview - FIXED: Removed conflicting position properties */
.wallpaper-preview {
    /* Removed position: static and top: 100px - they were conflicting */
    position: relative; /* Changed to relative for proper layout */
}

.preview-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--color-accent), var(--color-secondary));
    padding: 3px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.wallpaper-image {
    width: 100%;
    height: auto;
    border-radius: 17px;
    display: block;
    transition: transform 0.3s ease;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 17px;
}

.preview-container:hover .preview-overlay {
    opacity: 1;
}

.fullscreen-btn {
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.fullscreen-btn:hover {
    background: var(--color-accent-light);
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
}

/* Wallpaper Details */
.wallpaper-details {
    padding: 1rem 0;
}

.wallpaper-header {
    margin-bottom: 2rem;
}

.wallpaper-title {
    font-size: 22px;
    font-weight: 800;
    color: #5f479a;
    margin-top: 60px;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--color-accent), var(--color-secondary));
    overflow: hidden;
}

.wallpaper-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f0f0f0;
    font-size: 0.95rem;
}

.stat i {
    color: var(--color-accent);
}

/* Wallpaper Meta */
.wallpaper-meta {
    background: #262626;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.meta-row:last-child {
    margin-bottom: 0;
}

.meta-label {
    min-width: 100px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f0f0f0d0;
}

.meta-value {
    color: #f0f0f0;
    font-weight: 600;
}

.category-tag {
    background: linear-gradient(45deg, var(--color-accent), var(--color-secondary));
    color: #ff004f;
    font-size: 1rem;
    font-weight: 600;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: var(--color-accent);
    color: #ff004f;
    transform: translateY(-2px);
}

/* Description */
.wallpaper-description {
    margin-bottom: 2.5rem;
    margin-top: 50px;
}

.wallpaper-description h3 {
    color: #f0f0f0;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.wallpaper-description p {
    color: #f0f0f0d0;
    line-height: 1.6;
    font-size: 1rem;
}

/* Download Section */
.download-section {
    margin-bottom: 2.5rem;
    margin-top: 50px;
}

.download-section h3 {
    color: #f0f0f0;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-section h3 i {
    color: var(--color-accent);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.download-btn {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}

.download-btn:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.download-btn.primary {
    background: linear-gradient(45deg, var(--color-accent), var(--color-secondary));
    border-color: transparent;
    color: #f0f0f0d0;
    background-color: #262626;
}

.download-btn.primary:hover {
    color: #ff004f;
    transform: translateY(-4px);
}

.btn-content .resolution {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.btn-content .dimensions {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.action-btn {
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.action-btn.favorite.active {
    background: #ec4899;
    color: white;
}

.action-btn.favorite.active i {
    color: white;
}

/* Related Section */
.related-section {
    margin-top: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--color-accent);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: var(--color-surface);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-card-content {
    padding: 1.5rem;
}

.related-card h4 {
    color: var(--color-text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.related-card p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.fullscreen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

#fullscreenImage {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wallpaper-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .wallpaper-preview {
        position: relative; /* Keep relative on tablet/mobile */
    }

    .download-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* Reduce top padding on tablet */
    .wallpaper-showcase {
        padding: 5rem 0 4rem;
    }
}

@media (max-width: 768px) {
    .wallpaper-title {
        font-size: 2rem;
        margin-top: 30px; /* Reduced margin on mobile */
    }

    .wallpaper-stats {
        gap: 1rem;
    }

    .meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .meta-label {
        min-width: auto;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
    
    /* Further reduce top padding on mobile */
    .wallpaper-showcase {
        padding: 4rem 0 2rem;
    }
}

@media (max-width: 480px) {
    .wallpaper-showcase {
        padding: 3rem 0 2rem; /* Minimal padding on small mobile */
    }

    .container {
        padding: 0 1rem;
    }

    .wallpaper-title {
        font-size: 1.8rem;
        margin-top: 20px;
    }

    .download-btn {
        padding: 1rem;
    }

    .btn-content .resolution {
        font-size: 1rem;
    }
}

/* Additional styles for enhanced wallpaper showcase */

.quick-actions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--color-accent);
}

.download-tip {
    margin: 0;
    color: #f0f0f0c5;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-tip i {
    color: var(--color-accent);
    font-size: 1rem;
}

.download-tip strong {
    color: var(--color-accent);
}

/* Enhanced wallpaper preview with loading state */
.preview-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced download buttons with better visual feedback */
.download-btn.downloading {
    pointer-events: none;
    opacity: 0.7;
}

.download-btn.success {
    background: linear-gradient(45deg, #10B981, #059669) !important;
    border-color: transparent !important;
}

.download-btn.success .btn-content {
    color: white;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
