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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* Prevent scrolling */
    height: 100vh;
    width: 100vw;
    perspective: 2000px; /* Enable 3D perspective for flip effect */
}

/* Carousel Container */
.carousel-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Carousel Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Split Screen Layout */
.buying-section,
.selling-section {
    height: 50vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Flip Animation Classes */
.buying-section.flipping {
    animation: flipClockwise 1s ease-in-out;
}

.selling-section.flipping {
    animation: flipAntiClockwise 1s ease-in-out;
}

.buying-section.flipping-reverse {
    animation: flipAntiClockwise 1s ease-in-out;
}

.selling-section.flipping-reverse {
    animation: flipClockwise 1s ease-in-out;
}

@keyframes flipClockwise {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
        opacity: 0.5;
    }
    100% {
        transform: rotateY(0deg);
    }
}

@keyframes flipAntiClockwise {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-90deg);
        opacity: 0.5;
    }
    100% {
        transform: rotateY(0deg);
    }
}

/* Top Half - BUYING Section - Slide 1 */
.carousel-slide[data-slide="1"] .buying-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%),
                url('images/buy.png') center/cover;
    color: white;
}

/* Bottom Half - SELLING Section - Slide 1 */
.carousel-slide[data-slide="1"] .selling-section {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.4) 0%, rgba(245, 87, 108, 0.4) 100%),
                url('images/sell.png') center/cover;
    color: white;
}

/* Home Section - Slide 1 (Full Screen) */
.home-section {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('images/home.png') center/cover;
    color: white;
}

/* Default backgrounds for other slides */
.buying-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.selling-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Slide 2 Backgrounds */
.slide2-top {
    /* "Flip" */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%),
                url('images/flip.png') center/cover;
}

.slide2-bottom {
    /* "Thrift" */
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.4) 0%, rgba(245, 87, 108, 0.4) 100%),
                url('images/thrift.png') center/cover;
}

/* Slide 3 Backgrounds */
.slide3-top {
    /* "Economical" */
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.4) 0%, rgba(41, 128, 185, 0.4) 100%),
                url('images/economical.png') center/cover;
}

.slide3-bottom {
    /* "Ecological" */
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.4) 0%, rgba(245, 87, 108, 0.4) 100%),
                url('images/ecological.png') center/cover;
}

/* Content Wrapper */
.content-wrapper {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    animation: fadeIn 1s ease-in;
}

/* Section Titles */
.section-title {
    font-size: 3rem;
    font-weight: 400;
    margin: 1rem 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* Glassmorphism effect with fallback */
    background: rgba(255, 255, 255, 0.25); /* Fallback for non-supporting browsers */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .section-title {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Section Descriptions */
.section-description {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.95;
    margin: 1rem 0;
    /* Glassmorphism effect with fallback */
    background: rgba(255, 255, 255, 0.25); /* Fallback for non-supporting browsers */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .section-description {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Icon Containers */
.icon-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    /* Glassmorphism effect with fallback */
    background: rgba(255, 255, 255, 0.2); /* Fallback for non-supporting browsers */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
    .icon-container {
        background: rgba(255, 255, 255, 0.1);
    }
}

.icon {
    font-size: 3rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.icon:nth-child(2) {
    animation-delay: 0.5s;
}

.icon:nth-child(3) {
    animation-delay: 1s;
}

/* Central Message */
.central-message {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100;
    transform: translate(-50%, -50%) scale(1);
    /* Glassmorphism effect with fallback */
    background: rgba(255, 255, 255, 0.25); /* Fallback for non-supporting browsers */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                top 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                left 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .central-message {
        background: rgba(255, 255, 255, 0.15);
    }
}

.central-message.hidden {
    opacity: 0;
    visibility: hidden;
}

.central-message.minimized .logo-text {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Animation for central message - stay centered and minimize */
.central-message.minimized {
    transform: translate(-50%, -50%) scale(0.4);
    padding: 0;
    /* Remove glass effect when minimized */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

/* Hide core message when minimized */
.central-message.minimized .core-message {
    display: none;
}

.core-message {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.4;
    max-width: 600px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo Container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Logo */
.logo {
    max-width: 120px;
    height: auto;
    display: block;
}

/* Logo Text */
.logo-text {
    font-family: 'Londrina Shadow', cursive;
    font-size: 2.1rem;
    font-weight: 8  00;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-buy {
    color: #f5576c;
}

.logo-bye {
    color: #667eea;
}

/* Floating Contact Button */
.contact-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    /* Enhanced glassmorphism effect */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.contact-button:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Stamp Badge for Sell Section */
.stamp-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 4px dashed rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-align: center;
    transform: rotate(-3deg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes pulse {
    0%, 100% {
        transform: rotate(-3deg) scale(1);
    }
    50% {
        transform: rotate(-3deg) scale(1.05);
    }
}

/* No Card Required Text */
.no-card-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    /* Glassmorphism effect with fallback */
    background: rgba(255, 255, 255, 0.25); /* Fallback for non-supporting browsers */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
    .no-card-text {
        background: rgba(255, 255, 255, 0.15);
    }
}

.no-card {
    font-size: 3.5rem;
}

/* Hidden title that preserves spacing */
.hidden-preserve-layout {
    visibility: hidden;
    margin: 1rem 0;
}

/* Hover Effects */
.buying-section:hover {
    transform: scale(1.01);
}

.selling-section:hover {
    transform: scale(1.01);
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .section-title {
        font-size: 3rem;
    }

    .section-description {
        font-size: 1.1rem;
    }

    .core-message {
        font-size: 1.5rem;
    }

    .central-message {
        padding: 1rem 2rem;
    }
    
    .central-message.minimized {
        transform: translate(-50%, -50%) scale(0.4);
    }

    .logo {
        max-width: 80px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }

    .icon {
        font-size: 2.5rem;
    }

    .icon-container {
        gap: 1.5rem;
    }

    .contact-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .stamp-badge {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
    }

    .no-card-text {
        font-size: 1rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .section-title {
        font-size: 2.5rem;
    }

    .section-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .core-message {
        font-size: 1.1rem;
    }

    .central-message {
        padding: 0.8rem 1.2rem;
        max-width: 90vw;
    }
    
    .central-message.minimized {
        transform: translate(-50%, -50%) scale(0.35);
    }

    .logo {
        max-width: 60px;
    }
    
    .logo-text {
        font-size: 1rem;
    }

    .icon {
        font-size: 2rem;
    }

    .no-card {
        font-size: 2.5rem;
    }

    .icon-container {
        gap: 1rem;
    }

    .contact-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        bottom: 1rem;
        right: 1rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .stamp-badge {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    .no-card-text {
        font-size: 0.9rem;
    }
}

/* High Resolution Displays */
@media (min-width: 1920px) {
    .section-title {
        font-size: 5rem;
    }

    .section-description {
        font-size: 1.5rem;
    }

    .core-message {
        font-size: 2.5rem;
    }

    .logo {
        max-width: 150px;
    }
    
    .logo-text {
        font-size: 2.2rem;
    }

    .icon {
        font-size: 4rem;
    }

    .stamp-badge {
        font-size: 2rem;
        padding: 1.5rem 3rem;
    }

    .no-card-text {
        font-size: 1.3rem;
    }
}

/* Snackbar Notification */
.snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 300;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: visibility 0s, opacity 0.5s ease-in-out;
    opacity: 0;
}

.snackbar.show {
    visibility: visible;
    opacity: 1;
}

/* Snackbar responsive design */
@media (max-width: 480px) {
    .snackbar {
        min-width: 200px;
        font-size: 0.9rem;
        padding: 14px;
        bottom: 20px;
    }
}

/* Carousel Navigation Dots */
.carousel-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    gap: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    transform: scale(1.3);
}

/* Slide message styling */
.slide-message {
    font-size: 4.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments for carousel dots */
@media (max-width: 768px) {
    .carousel-dots {
        bottom: 1.5rem;
        gap: 0.8rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .slide-message {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .carousel-dots {
        bottom: 1rem;
        gap: 0.6rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .slide-message {
        font-size: 2.5rem;
    }
}
