.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(226deg, #000000 0%, #577776 300%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 2s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

.intro-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-text {
    position: absolute;
    color: rgba(253, 253, 253, 0.8);
    font-size: clamp(18px, 4vw, 28px);
    font-family: 'Cinzel', serif;
    font-style: italic;
    text-align: center;
    opacity: 0;
    white-space: nowrap;
    max-width: 90%;
    word-wrap: break-word;
}

.intro-text:first-child {
    animation: fadeInOut 3s ease-in-out forwards;
    animation-delay: 0.5s;
}

.intro-text:nth-child(2) {
    animation: fadeInOut 3s ease-in-out forwards;
    animation-delay: 3.5s;
}

.intro-text:last-child {
    animation: fadeInOut 3s ease-in-out forwards;
    animation-delay: 7s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(https://artificialdeath.b-cdn.net/funeralelegy-website/base%20assets/CG_00_00.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.main-content {
    opacity: 0;
    transition: opacity 2s ease-in;
    width: 100%;
}

.main-content.show {
    opacity: 1;
}

.main-wrapper {
    margin: 20px auto;
    color: #000;
    max-width: 1200px;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
}

.container {
    display: flex;
    width: min(500px, 90vw);
    height: min(500px, 90vw);
    max-height: 70vh;
    padding: 20px;
    justify-content: center;
    margin: 40px 0;
    box-sizing: border-box;
}

.container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgb(0, 0, 0));
}

.button {
    color: #fff;
    margin: 0 auto;
    font-weight: bold;
    padding: 18px 35px;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.button a {
    color: white;
    text-decoration: none;
    padding: 18px 35px;
    background: rgba(207, 80, 80, 0);
    background: linear-gradient(45deg, rgb(0, 0, 0) 0%, rgb(138, 5, 5) 100%);
    border-radius: 40px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    font-size: clamp(14px, 2.5vw, 16px);
    transition: all 0.3s ease;
}

.button a:hover {
    background: rgb(0, 0, 0);
    border-radius: 40px;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.main-visible {
    overflow: auto;
}

/* Large tablet/small desktop breakpoint */
@media (max-width: 1200px) and (min-width: 1025px) {
    .main-wrapper {
        max-width: 90%;
        padding: 0 15px;
    }
    
    .container {
        width: min(450px, 85vw);
        height: min(450px, 85vw);
        margin: 30px 0;
        padding: 18px;
    }
    
    .intro-text {
        font-size: clamp(20px, 3.5vw, 26px);
        padding: 0 15px;
    }
    
    .button {
        max-width: 380px;
        padding: 17px 30px;
    }
    
    .button a {
        font-size: 17px;
        padding: 17px 30px;
    }
}

/* Tablet breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-wrapper {
        margin: 15px auto;
        padding: 0 8px;
    }
    
    .container {
        width: min(400px, 80vw);
        height: min(400px, 80vw);
        padding: 18px;
        margin: 25px 0;
    }
    
    .intro-text {
        font-size: clamp(18px, 4vw, 22px);
        padding: 0 18px;
        white-space: normal;
        line-height: 1.4;
    }
    
    .button {
        max-width: 320px;
        padding: 16px 25px;
    }
    
    .button a {
        padding: 16px 25px;
        font-size: 18px;
    }
    
    body {
        background-attachment: scroll;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) and (min-width: 481px) {
    .main-wrapper {
        margin: 10px;
        padding: 0 5px;
    }
    
    .intro-text {
        font-size: clamp(16px, 4vw, 20px);
        padding: 0 15px;
        white-space: normal;
        line-height: 1.4;
    }
    
    .text-left, .text-right {
        font-size: clamp(16px, 3vw, 18px);
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        text-align: center;
        margin: 10px 0;
        padding: 0 10px;
    }
    
    .container {
        width: min(300px, 75vw);
        height: min(300px, 75vw);
        padding: 15px;
        margin: 20px 0;
    }
    
    .button {
        padding: 15px 20px;
        max-width: 280px;
    }
    
    .button a {
        padding: 15px 20px;
        font-size: 18px;
    }
    
    body {
        background-attachment: scroll;
    }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
    .main-wrapper {
        margin: 5px;
        padding: 0;
    }
    
    .intro-text {
        font-size: clamp(14px, 4.5vw, 18px);
        padding: 0 12px;
        white-space: normal;
        line-height: 1.3;
    }
    
    .container {
        width: min(250px, 85vw);
        height: min(250px, 85vw);
        padding: 12px;
        margin: 15px 0;
    }
    
    .button {
        max-width: 240px;
        padding: 12px 15px;
    }
    
    .button a {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .text-left, .text-right {
        font-size: clamp(14px, 3.5vw, 16px);
        padding: 0 8px;
        margin: 8px 0;
    }
}

/* Extra small mobile breakpoint */
@media (max-width: 320px) {
    .main-wrapper {
        margin: 3px;
        padding: 0;
    }
    
    .intro-text {
        font-size: 14px;
        padding: 0 10px;
        line-height: 1.2;
    }
    
    .container {
        width: min(180px, 90vw);
        height: min(180px, 90vw);
        padding: 10px;
        margin: 10px 0;
    }
    
    .button {
        max-width: 200px;
        padding: 10px 12px;
    }
    
    .button a {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .text-left, .text-right {
        font-size: 12px;
        padding: 0 5px;
        margin: 5px 0;
    }
}

/* Large desktop styles */
@media (min-width: 1201px) {
    .main-wrapper {
        max-width: 1400px;
    }
    
    .container {
        width: 600px;
        height: 600px;
    }
    
    .intro-text {
        font-size: 32px;
    }
    
    .button a {
        font-size: 18px;
        max-width: 450px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        width: min(300px, 40vh);
        height: min(300px, 40vh);
        margin: 10px 0;
    }
    
    .main-wrapper {
        min-height: auto;
        padding: 8px;
    }
    
    .intro-screen {
        padding: 8px;
    }
}