* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #6F3B95 0%, #5a2d7a 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100vh;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 8px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.header {
    text-align: center;
    padding: 8px 0;
    flex-shrink: 0;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: inline-block;
}

.logo-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.logo-link:hover {
    opacity: 0.8;
}

.monitor-container {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

/* CSS Monitor Frame - Optimized for single page fit */
.monitor-frame {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16 / 10;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Monitor Bezel (outer frame) */
.monitor-bezel {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 0 0 3px #000,
    0 25px 70px rgba(0, 0, 0, 0.6),
    inset 0 0 25px rgba(0, 0, 0, 0.3);
    animation: monitorGlow 3s ease-in-out infinite;
}

@keyframes monitorGlow {
    0%, 100% {
        box-shadow: 0 0 0 3px #000,
        0 25px 70px rgba(0, 0, 0, 0.6),
        inset 0 0 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 0 3px #000,
        0 25px 70px rgba(111, 59, 149, 0.3),
        inset 0 0 25px rgba(0, 0, 0, 0.3);
    }
}

/* Monitor Screen */
.monitor-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.15);
}

/* Screen Content Container */
.screen-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 25px;
    overflow: hidden;
}

/* Welcome Message - Centered */
.welcome-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #6F3B95;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-message h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #6F3B95;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.welcome-message p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #6F3B95;
    line-height: 1.5;
}

.welcome-message .rebrand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4em;
    padding: 18px 45px;
    border: none;
    border-radius: 12px;
    margin-top: 25px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #6F3B95 0%, #8B4DB8 100%);
    box-shadow: 0 8px 25px rgba(111, 59, 149, 0.4),
    0 0 0 0 rgba(111, 59, 149, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    overflow: visible;
    animation: buttonPulse 2s ease-in-out infinite;
}

.rebrand-link-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rebrand-link-main {
    display: block;
}

.rebrand-link-subtitle {
    font-size: 0.5em;
    font-weight: 600;
    letter-spacing: 0.1em;
    opacity: 0.9;
    text-transform: uppercase;
}

.welcome-message .rebrand-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.welcome-message .rebrand-link:hover::before {
    width: 400px;
    height: 400px;
}

.welcome-message .rebrand-link:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 35px rgba(111, 59, 149, 0.6),
    0 0 0 4px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #8B4DB8 0%, #6F3B95 100%);
}

.welcome-message .rebrand-link:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(111, 59, 149, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.3);
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(111, 59, 149, 0.4),
        0 0 0 0 rgba(111, 59, 149, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 12px 35px rgba(111, 59, 149, 0.6),
        0 0 0 4px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.02);
    }
}

.welcome-message .rebrand-link:hover .rebrand-link-subtitle {
    opacity: 1;
}

/* Bottom Left - Space for Images with clickable links */
.bottom-left {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    animation: fadeInLeft 1s ease-out 0.3s both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.image-link:hover {
    transform: translateY(-5px);
}

.bottom-left .image-placeholder {
    width: 100px;
    height: 100px;
    background-color: #ffffff;
    border: 3px solid #6F3B95;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(111, 59, 149, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bottom-left .image-link:hover .image-placeholder {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(111, 59, 149, 0.3);
}

.bottom-left .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

/* Bottom Right - Implementing Caspio Text */
.bottom-right {
    position: absolute;
    bottom: 25px;
    right: 25px;
    text-align: right;
    animation: fadeInRight 1s ease-out 0.5s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bottom-right .caspio-text {
    font-size: 2em;
    font-weight: 700;
    color: #6F3B95;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(111, 59, 149, 0.1);
    letter-spacing: 0.02em;
}

.content {
    background-color: rgba(111, 59, 149, 0.9);
    color: #ffffff;
    padding: 10px 20px;
    text-align: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.content p {
    margin-bottom: 8px;
}

.content strong {
    font-size: 1.1em;
}

.footer {
    text-align: center;
    padding: 6px 20px;
    color: #ffffff;
    font-size: 0.85em;
    flex-shrink: 0;
}

.footer #copyright-year {
    display: inline;
}

/* 1440px and below */
@media (max-width: 1440px) {
    .monitor-frame {
        width: 92%;
        max-height: 100%;
    }
    
    .screen-content {
        padding: 22px;
    }
    
    .welcome-message h1 {
        font-size: 2.3em;
        margin-bottom: 18px;
    }
    
    .welcome-message p {
        font-size: 1.15em;
        margin-bottom: 14px;
    }
}

/* 1024px and below */
@media (max-width: 1024px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 8px 0;
    }

    .monitor-frame {
        width: 95%;
        max-height: 100%;
    }

    .monitor-bezel {
        padding: 10px;
    }

    .screen-content {
        padding: 20px;
    }

    .welcome-message h1 {
        font-size: 2em;
        margin-bottom: 16px;
    }

    .welcome-message p {
        font-size: 1.05em;
        margin-bottom: 12px;
    }

    .welcome-message .rebrand-link {
        font-size: 1.25em;
        padding: 16px 40px;
        margin-top: 18px;
    }

    .bottom-left .image-placeholder {
        width: 80px;
        height: 80px;
    }

    .bottom-right .caspio-text {
        font-size: 1.5em;
    }

    .content {
        padding: 10px 18px;
        font-size: 0.9em;
    }

    .footer {
        padding: 6px 18px;
        font-size: 0.8em;
    }
}

/* 768px and below */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }

    .logo-link {
        font-size: 1.5rem;
    }

    .header {
        padding: 6px 0;
    }

    .monitor-container {
        margin: 5px 0;
        padding: 5px 0;
    }

    .monitor-frame {
        width: 98%;
        max-height: 100%;
        aspect-ratio: 16 / 10.5;
    }

    .monitor-bezel {
        padding: 8px;
    }

    .screen-content {
        padding: 18px 12px;
    }

    .welcome-message h1 {
        font-size: 1.6em;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .welcome-message p {
        font-size: 0.95em;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .welcome-message .rebrand-link {
        font-size: 1em;
        padding: 12px 28px;
        margin-top: 15px;
        width: auto;
        max-width: 90%;
    }

    .bottom-left {
        bottom: 10px;
        left: 10px;
        gap: 8px;
    }

    /* Reduced size for mobile */
    .bottom-left .image-placeholder {
        width: 55px;
        height: 55px;
    }

    .bottom-right {
        bottom: 10px;
        right: 10px;
    }

    .bottom-right .caspio-text {
        font-size: 1em;
    }

    .content {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .content p {
        margin-bottom: 5px;
    }

    .footer {
        padding: 6px 12px;
        font-size: 0.75em;
    }
}

/* 480px and below - Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 4px;
    }

    .logo-link {
        font-size: 1.2rem;
    }

    .header {
        padding: 5px 0;
    }

    .monitor-container {
        margin: 3px 0;
        padding: 3px 0;
    }

    .monitor-frame {
        width: 100%;
        max-height: 100%;
        aspect-ratio: 16 / 11;
    }

    .monitor-bezel {
        padding: 6px;
    }

    .screen-content {
        padding: 12px 8px;
    }

    .welcome-message h1 {
        font-size: 1.3em;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .welcome-message p {
        font-size: 0.85em;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .welcome-message .rebrand-link {
        font-size: 0.9em;
        padding: 10px 20px;
        margin-top: 12px;
        letter-spacing: 0.05em;
        width: auto;
        max-width: 95%;
        gap: 6px;
    }

    .rebrand-link-subtitle {
        font-size: 0.45em;
    }

    .bottom-left {
        bottom: 8px;
        left: 8px;
        gap: 6px;
    }

    /* Further reduced size for small mobile */
    .bottom-left .image-placeholder {
        width: 45px;
        height: 45px;
    }

    .bottom-right {
        bottom: 8px;
        right: 8px;
    }

    .bottom-right .caspio-text {
        font-size: 0.85em;
    }

    .content {
        padding: 8px 10px;
        font-size: 0.75em;
    }

    .content strong {
        font-size: 1em;
    }

    .content p {
        margin-bottom: 4px;
    }

    .footer {
        padding: 5px 10px;
        font-size: 0.7em;
    }
}

@media (max-width: 360px) {
    .welcome-message h1 {
        font-size: 1.2em;
    }

    .welcome-message p {
        font-size: 0.85em;
    }

    .welcome-message .rebrand-link {
        font-size: 0.85em;
        padding: 10px 20px;
        gap: 6px;
    }

    .rebrand-link-subtitle {
        font-size: 0.4em;
    }

    .bottom-left .image-placeholder {
        width: 45px;
        height: 45px;
    }

    .bottom-right .caspio-text {
        font-size: 0.8em;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 4px 0;
    }

    .monitor-container {
        margin: 3px 0;
        padding: 3px 0;
    }

    .monitor-frame {
        width: 95%;
        max-height: 100%;
        aspect-ratio: 16 / 9;
    }

    .monitor-bezel {
        padding: 6px;
    }

    .screen-content {
        padding: 10px 12px;
    }

    .welcome-message h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }

    .welcome-message p {
        font-size: 0.85em;
        margin-bottom: 6px;
    }

    .welcome-message .rebrand-link {
        font-size: 0.95em;
        padding: 8px 20px;
        margin-top: 10px;
        gap: 6px;
    }

    .bottom-left {
        bottom: 8px;
        left: 8px;
        gap: 6px;
    }

    .bottom-left .image-placeholder {
        width: 45px;
        height: 45px;
    }

    .bottom-right {
        bottom: 8px;
        right: 8px;
    }

    .bottom-right .caspio-text {
        font-size: 0.9em;
    }

    .content {
        padding: 6px 12px;
        font-size: 0.75em;
    }

    .footer {
        padding: 4px 12px;
        font-size: 0.7em;
    }
}

/* 375px and below - Small mobile devices */
@media (max-width: 375px) {
    .screen-content {
        padding: 10px 8px 10px 8px;
    }

    .welcome-message {
        transform: translateY(-8px);
    }

    .welcome-message h1 {
        font-size: 1.2em;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .welcome-message p {
        font-size: 0.8em;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .welcome-message .rebrand-link {
        font-size: 0.75em;
        padding: 8px 16px;
        margin-top: 10px;
        letter-spacing: 0.04em;
        width: auto;
        max-width: 95%;
        gap: 5px;
    }

    .rebrand-link-subtitle {
        font-size: 0.4em;
    }

    .bottom-left {
        bottom: 6px;
        left: 6px;
        gap: 5px;
    }

    .bottom-left .image-placeholder {
        width: 40px;
        height: 40px;
    }

    .bottom-right {
        bottom: 6px;
        right: 6px;
    }

    .bottom-right .caspio-text {
        font-size: 0.75em;
    }
}

/* 320px and below - Extra small mobile devices */
@media (max-width: 320px) {
    .screen-content {
        padding: 8px 6px 8px 6px;
    }

    .welcome-message {
        transform: translateY(-10px);
    }

    .welcome-message h1 {
        font-size: 1.1em;
        margin-bottom: 6px;
        line-height: 1.15;
    }

    .welcome-message p {
        font-size: 0.75em;
        margin-bottom: 5px;
        line-height: 1.25;
    }

    .welcome-message .rebrand-link {
        font-size: 0.7em;
        padding: 7px 14px;
        margin-top: 8px;
        letter-spacing: 0.03em;
        width: auto;
        max-width: 95%;
        gap: 4px;
    }

    .rebrand-link-subtitle {
        font-size: 0.38em;
    }

    .bottom-left {
        bottom: 5px;
        left: 5px;
        gap: 4px;
    }

    .bottom-left .image-placeholder {
        width: 35px;
        height: 35px;
    }

    .bottom-right {
        bottom: 5px;
        right: 5px;
    }

    .bottom-right .caspio-text {
        font-size: 0.7em;
    }
}
