/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Body Styling */
body {
    font-family: 'Orbitron', sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;

}

/* Neon Grid Background */
.neon-grid {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background:
        linear-gradient(0deg, rgba(0, 32, 36, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 32, 36, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    animation: grid-pulse 4s infinite alternate;
}

/* Main Container */
.copyright-container {
    position: relative;
    background: rgba(0, 32, 36, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 800px;
    box-shadow:
        0 0 40px rgba(0, 188, 212, 0.3),
        0 0 80px rgba(0, 188, 212, 0.2) inset;
    border: 1px solid rgba(0, 188, 212, 0.4);
    overflow: hidden;
    z-index: 1;
    zoom: 0.8;
}

/* Perimeter Border Animation */
.copyright-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(
            45deg,
            #00bcd4 0%,
            #00bcd4 25%,
            transparent 25%,
            transparent 50%,
            #00bcd4 50%,
            #00bcd4 75%,
            transparent 75%,
            transparent 100%
    );
    background-size: 200% 200%;
    -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
    mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: border-flow 3s linear infinite;
    z-index: -1;
}

/* Title Styling */
.title {
    font-size: 2.8rem;
    background: linear-gradient(45deg, #00bcd4, #ff4081);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
    position: relative;
    letter-spacing: 2px;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00bcd4, transparent);
}

/* Content Styling */
.content {
    position: relative;
    padding: 2rem;
    background: rgba(0, 20, 24, 0.6);
    border-radius: 16px;
    margin: 2rem 0;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0f8ff;
    margin-bottom: 1.2rem;
    text-align: center;
}

.highlight {
    color: #00bcd4;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.4);
}

/* Postcard Grid */
.postcard-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
}

.postcard {
    position: relative;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: #0a1a1f;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.postcard:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-1deg);
    box-shadow: 0 25px 40px rgba(0, 188, 212, 0.3);
}

.postcard::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.1),
        transparent
    );
    transition: 0.7s;
    z-index: 1;
}

.postcard:hover::after {
    left: 100%;
}

.postcard-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.postcard:hover .postcard-image {
    transform: scale(1.08);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 32, 36, 0.9));
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

/* Back Link */
.back-link {
    display: flex; /* Changed from inline-flex for better centering */
    justify-content: center; /* Ensures content stays centered */
    margin: 2rem auto; /* Adds significant space above/below and centers horizontally */
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #25607c, #042b5e);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    max-width: max-content; /* Prevents button from stretching */
}


.back-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 174, 255, 0.4),
        transparent
    );
    animation: button-shine 5s infinite;
    transition: 0.6s;
}

.back-link:hover {
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.6);
    transform: translateY(-6px);
}

.back-link:hover::before {
    animation-duration: 1.5s;
}

.back-link:hover::after {
    animation-duration: 1.2s;
    width: 30%;
}

/* Animations */
@keyframes border-flow {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 200%;
    }
}

@keyframes grid-pulse {
    0% {
        opacity: 0.3;
        background-position: 0 0;
    }
    50% {
        opacity: 0.6;
        background-position: 10px 10px;
    }
    100% {
        opacity: 0.3;
        background-position: 0 0;
    }
}

@keyframes button-shine {
    0% { transform: translateX(-100%) skew(-20deg); }
    100% { transform: translateX(200%) skew(-20deg); }
}
/* Existing styles remain the same until the media queries section */

/* Updated Responsive Design */
@media (max-width: 1200px) {
    .copyright-container {
        max-width: 90%;
        padding: 2rem;
    }

    .title {
        font-size: 2.4rem;
    }

    .postcard {
        height: 350px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .title {
        font-size: 2.2rem;
    }

    .content {
        padding: 1.5rem;
    }

    .postcard-images {
        gap: 1.5rem;
    }

    .postcard {
        height: 300px;
    }
}

/* Updated Tablet Portrait Media Query */
@media (max-width: 768px) {
    body {
        padding: 20px 0;
    }

    .copyright-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .title {
        font-size: 2rem;
    }

    /* Removed grid-template-columns change */
    .postcard-images {
        gap: 1.5rem;
    }

    .postcard {
        height: 280px;
        border-radius: 12px;
    }

    .back-link {
        padding: 0.7rem 1.5rem;
    }
}

/* Mobile Devices - Keep side-by-side */
@media (max-width: 480px) {
    .postcard-images {
        grid-template-columns: repeat(2, 1fr); /* Explicitly keep 2 columns */
        gap: 1rem; /* Reduce gap for small screens */
    }

    .postcard {
        height: 180px; /* More compact height */
    }
}



/* Small Mobile Devices - Enhanced Text Readability */
@media (max-width: 360px) {
    .copyright-container {
        padding: 0.8rem;
        border-radius: 12px;
    }

    .title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .title::after {
        bottom: -6px;
        height: 1px;
    }

    .content {
        padding: 0.8rem;
        margin: 1rem 0;
    }

    .text {
        font-size: 0.9rem;
        line-height: 1.4;
        text-align: left; /* Better for narrow screens */
        hyphens: auto; /* Enable hyphenation */
        margin-bottom: 0.8rem;
    }

    .postcard {
        height: 180px;
    }
    .postcard-images {
        grid-template-columns: 1fr; /* Stack below 360px */
    }
    .image-caption {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .back-link {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Extra Small Screens (e.g. Galaxy Fold) */
@media (max-width: 280px) {
    .title {
        font-size: 1.2rem;
    }

    .text {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .postcard {
        height: 150px;
    }

    .back-link {
        width: 100%;
        justify-content: center;
    }
}

/* Height Optimization for Very Short Screens */
@media (max-height: 600px) {
    .copyright-container {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .postcard-images {
        grid-template-columns: 1fr;
    }
}

/* 4K Screens */
@media (min-width: 2000px) {
    .neon-grid {
        background-size: 30px 30px;
    }

    .copyright-container {
        max-width: 1000px;
        padding: 4rem;
        border-radius: 32px;
    }

    .title {
        font-size: 3.5rem;
    }

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