/* Global Variables */
:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --secondary-color: #64748B;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    color: #1F2937;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.bg-gradient {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}

.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
    padding: 1rem 0;
}

.category-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.category-card img {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    height: 240px;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
    border-radius: 16px;
}

/* Notification Styles */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    border-left: 4px solid #4F46E5;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left-color: #10B981;
}

.notification.error {
    border-left-color: #EF4444;
}

.notification.warning {
    border-left-color: #F59E0B;
}

.notification.info {
    border-left-color: #3B82F6;
}

.wallpaper-card .card-img-top {
    aspect-ratio: 1242 / 2688;
    object-fit: cover;
    width: 100%;
}
.social-icon {
    font-size: 20px;
    color: #666;
    transition: color 0.3s ease;
}
.social-icon:hover {
    color: #000;
}
.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.5;
}

/* Diagonal Scroll Section Styles */
.diagonal-scroll {
    position: absolute;
    top: -25%;
    left: -25%;
    right: -25%;
    bottom: -25%;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
    z-index: 0;
    transform: rotate(-15deg);
}
.diagonal-scroll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,255,255,0.1) 20%,
        rgba(255,255,255,0.1) 80%,
        rgba(255,255,255,0.9) 100%);
    z-index: 1;
    pointer-events: none;
}
.diagonal-scroll-container {
    position: relative;
    width: 150vw;
    height: 130vh;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    justify-content: stretch;
}
.scroll-column {
    flex: 1;
    position: relative;
    height: 150vh;
    overflow: hidden;
}
.scroll-column-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation-duration: 150s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    width: 100%;
    padding: 0.5rem 0;
}
.scroll-column:nth-child(odd) .scroll-column-content {
    animation-name: scrollUp;
}
.scroll-column:nth-child(even) .scroll-column-content {
    animation-name: scrollDown;
    bottom: 0;
}
.diagonal-card {
    width: 100%;
    aspect-ratio: 1242 / 2688;
    flex-shrink: 0;
}
.diagonal-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    opacity: 1;
    filter: contrast(1.15) saturate(1.15) brightness(1.05);
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50%);
    }
}

@media (max-width: 768px) {
    .diagonal-scroll-container {
        gap: 0.5rem;
    }
    .scroll-column-content {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    .hero-content-inner {
        padding: 2.5rem 1.5rem;
        border-radius: 1.5rem;
        margin: 1rem;
    }
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 15vh;
    background: transparent;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.hero-content-inner {
    text-align: left;
    max-width: 1000px;
    margin: 0;
    margin-left: 6vw;
    padding: 2rem;
}
.hero-title {
    color: #000;
    margin-bottom: 1.2rem;
    font-weight: 900;
    font-size: 3.2rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 
        2px 2px 0 #fff,
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        0 2px 0 #fff,
        2px 0 0 #fff,
        0 -2px 0 #fff,
        -2px 0 0 #fff;
}
.hero-subtitle {
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.8rem;
    text-shadow: 
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff;
    opacity: 0.9;
}
.hero-badge {
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-bottom: 0;
}
.hero-buttons .btn {
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    min-width: 140px;
    font-size: 0.95rem;
    border-width: 2px;
}
.hero-buttons .btn-primary {
    background: #000;
    border-color: #000;
}
.hero-buttons .btn-primary:hover {
    background: #222;
    border-color: #222;
}
.hero-buttons .btn-outline-dark {
    border-color: #000;
    color: #000;
}
.hero-buttons .btn-outline-dark:hover {
    background: #000;
    color: #fff;
}
.hero-social {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.9);
    padding: 0.7rem 1.2rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
}
.hero-social-text {
    color: #000;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.85rem;
}
.social-icon {
    font-size: 1.1rem;
    color: #000;
    transition: all 0.3s ease;
}
.social-icon:hover {
    color: #0d6efd;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 10vh;
    }
    .hero-content-inner {
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1.5rem;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .hero-buttons .btn {
        width: auto;
        flex: 0 0 auto;
    }
    .hero-social {
        width: auto;
    }
}

.diagonal-scroll {
    position: absolute;
    top: -35%;
    left: -35%;
    right: -35%;
    bottom: -5%;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
    z-index: 0;
    transform: rotate(25deg) scale(1.2);
    transform-origin: center center;
}


/* category list */
.category-card {
    transition: transform 0.2s ease-in-out;
}

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

.category-card a:hover {
    text-decoration: none;
}

.card-img-top {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* category detail */
.wallpaper-container {
    position: relative;
}

.premium-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.premium-lock span {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.wallpaper-card .card-img-top {
    aspect-ratio: 1242 / 2688;
    object-fit: cover;
    width: 100%;
}


/* wallpaper detail */
.download-option {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.download-option:hover {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.device-icon {
    font-size: 24px;
    margin-right: 10px;
}

.mockup-preview {
    background-color: #000;
    border-radius: 15px;
    margin-bottom: 2rem;
    height: calc(100vh - 200px);
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.mockup-image {
    display: none;  /* 隱藏原始圖片 */
}
.download-section {
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 15px;
    height: calc(100vh - 200px);
    min-height: 600px;
}
.related-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}
.btn-download {
    width: 120px;  /* 改用固定寬度替代 min-width */
    margin-left: auto;
}
.btn-premium {
    background-color: #ffd700;
    border-color: #ffd700;
    color: #000;
}
.btn-premium:hover {
    background-color: #ffed4a;
    border-color: #ffed4a;
    color: #000;
}
.btn-premium.disabled {
    background-color: #ffe97d;
    border-color: #ffe97d;
    color: #666;
}
.resolution-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #666;
    margin-left: 0.5rem;
}
/* Add styles for 4K badge */
.resolution-badge.badge-4k {
    background-color: #dc3545;
    color: white;
}
@media (max-width: 768px) {
    .mockup-preview {
        height: 500px;
        min-height: auto;
        background-size: cover;
    }
    .mockup-image {
        max-height: 460px;
    }
    .download-section {
        height: auto;
        min-height: auto;
        margin-top: 2rem;
    }
}
.overlay-container {
    position: absolute;
    top: 10%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.8) 30%,
        rgba(255,255,255,0.95) 50%,
        rgba(255,255,255,0.99) 70%,
        rgba(255,255,255,1) 85%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 6rem;
}
.overlay-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 400px;
    margin: 0 auto;
}
.btn-like {
    border: 1px solid #dee2e6;
    background-color: white;
    color: #dc3545;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}
.btn-like:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}
.btn-like.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}
.btn-like i {
    font-size: 1.1rem;
    line-height: 1;
}
.modal-lg {
    max-width: 800px;
}
.premium-modal-image {
    position: relative;
}
.premium-modal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    border-top-left-radius: 0.3rem;
    border-bottom-left-radius: 0.3rem;
}
@media (max-width: 767.98px) {
    .premium-modal-image {
        min-height: 200px !important;
        border-top-left-radius: 0.3rem;
        border-top-right-radius: 0.3rem;
        border-bottom-left-radius: 0;
    }
    .premium-modal-image::after {
        border-radius: inherit;
    }
}
.download-option .d-flex {
    justify-content: space-between;
    gap: 1rem;
}
.download-option .info-container {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}
/* Add styles for premium download option */
.download-option:has(.btn-premium) {
    border: 2px solid #ffd700;
    background-color: rgba(255, 215, 0, 0.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}
.download-option:has(.btn-premium):hover {
    border-color: #ffed4a;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Pagination styles */
.pagination {
    gap: 5px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px !important;
    color: #555;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #e9ecef;
    color: #333;
    box-shadow: none;
}

.page-item.active .page-link {
    background-color: #333;
    color: white;
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #adb5bd;
}

/* Premium Overlay Styles */
.premium-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.98) 15%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 8rem;
}

.premium-overlay-content {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
}

.premium-overlay-image {
    width: 40%;
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 300px;
}

.premium-overlay-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.premium-overlay-text {
    width: 60%;
    padding: 2.5rem;
    text-align: left;
}

.premium-features-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.premium-features-list li {
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.premium-features-list li i {
    color: #28a745;
    margin-right: 0.5rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.countdown-timer {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #dc3545;
}

.countdown-timer span {
    font-weight: bold;
}

@media (max-width: 767.98px) {
    .premium-overlay-content {
        flex-direction: column;
        margin: 1rem;
    }
    
    .premium-overlay-image {
        width: 100%;
        min-height: 200px;
    }
    
    .premium-overlay-text {
        width: 100%;
        padding: 1.5rem;
    }
}