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

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #ffffff;
    --bg-gradient-start: #c0c0c0;
    --bg-gradient-end: #a8a8a8;
    --error-color: #ff4444;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--secondary-color);
    min-height: 100vh;
    overflow: hidden;
    cursor: none;
}

/* Ghost Cursor Icon */
.cursor-trail {
    position: fixed;
    width: 40px;
    height: 50px;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.cursor-trail::before {
    content: '👻';
    position: absolute;
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    animation: ghostFloat 2s ease-in-out infinite;
}

.cursor-trail::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    filter: blur(3px);
    animation: shadowPulse 2s ease-in-out infinite;
}

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

@keyframes shadowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.2;
        transform: translateX(-50%) scale(0.8);
    }
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.floating-logo {
    position: absolute;
    opacity: 0.25;
    animation: float 12s ease-in-out infinite;
    transform-style: preserve-3d;
    filter: brightness(1.5) contrast(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Mixed logos - scattered around */
.floating-logo-1 {
    width: 200px;
    height: auto;
    top: 8%;
    left: 5%;
    animation-delay: 0s;
}

.floating-logo-2 {
    width: 120px;
    height: auto;
    top: 15%;
    right: 10%;
    animation-delay: 2s;
}

.floating-logo-3 {
    width: 180px;
    height: auto;
    top: 50%;
    left: 3%;
    animation-delay: 4s;
}

.floating-logo-4 {
    width: 140px;
    height: auto;
    top: 55%;
    right: 8%;
    animation-delay: 6s;
}

.floating-logo-5 {
    width: 190px;
    height: auto;
    bottom: 10%;
    left: 8%;
    animation-delay: 8s;
}

.floating-logo-6 {
    width: 130px;
    height: auto;
    bottom: 15%;
    right: 5%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(5deg);
        opacity: 0.25;
    }
    25% {
        transform: translate(30px, -40px) rotate(-5deg);
        opacity: 0.35;
    }
    50% {
        transform: translate(-20px, 30px) rotate(8deg);
        opacity: 0.2;
    }
    75% {
        transform: translate(40px, 20px) rotate(-8deg);
        opacity: 0.3;
    }
}

/* Content */
.content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    width: 100%;
    background: #c0c0c0;
    padding: 60px 40px;
    border-radius: 20px;
    border: 5px solid var(--primary-color);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.4),
                15px 15px 0 rgba(0, 0, 0, 0.2),
                inset 0 0 0 3px #d4d4d4;
    backdrop-filter: blur(10px);
    animation: contentEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contentEntry {
    0% {
        transform: scale(0.8) rotate(-2deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.logo-container {
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

.logo {
    width: 180px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4));
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: logoFloat 3s ease-in-out infinite;
}

.logo:hover {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.5));
}

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

.protocol-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--primary-color);
    padding: 15px 30px;
    border-radius: 10px;
    border: 4px solid var(--primary-color);
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out 0.2s backwards, badgePulse 2s ease-in-out infinite;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.protocol-badge:hover {
    transform: scale(1.05);
    box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.4);
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.2);
    }
}

.protocol-logo {
    width: 80px;
    height: auto;
}

.protocol-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--primary-color);
    animation: fadeInDown 1s ease-out 0.4s backwards, textGlitch 3s ease-in-out infinite;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
    font-family: 'Impact', 'Arial Black', sans-serif;
}

@keyframes textGlitch {
    0%, 90%, 100% {
        text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
    }
    92% {
        text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15), 2px 2px 0 rgba(0, 0, 0, 0.1);
    }
    94% {
        text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
    }
}

.subtitle {
    font-size: 16px;
    color: #333;
    margin-bottom: 40px;
    letter-spacing: 2px;
    animation: fadeInDown 1s ease-out 0.6s backwards;
    font-weight: bold;
}

.highlight {
    color: var(--primary-color);
    font-weight: 900;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

/* Code Entry */
.code-entry-container {
    margin: 40px 0;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.code-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.code-input {
    width: 100%;
    padding: 20px 25px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 5px;
    text-align: center;
    background: #d4d4d4;
    border: 4px solid #000000;
    border-radius: 10px;
    color: #000000;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Arial Black', 'Impact', sans-serif;
}

.code-input::placeholder {
    color: #666;
    letter-spacing: 3px;
}

.code-input:focus {
    border-color: #000000;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    background: #d4d4d4;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.code-input:focus + .input-underline {
    width: 100%;
}

.submit-btn {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: #000000;
    color: #ffffff;
    border: 4px solid #000000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Impact', 'Arial Black', sans-serif;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 400px;
    height: 400px;
}

.submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.3);
}

.submit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.error-message {
    min-height: 30px;
    margin-top: 15px;
    color: var(--error-color);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Info Text */
.info-text {
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 1s backwards;
}

.info-text p {
    font-size: 14px;
    color: #444;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    background: #000000;
    border: 3px solid #000000;
    border-radius: 10px;
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 900;
    color: #ffffff;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    animation: statusFloat 3s ease-in-out infinite;
}

.solana-icon {
    width: 45px;
    height: auto;
    filter: brightness(1.2) drop-shadow(2px 2px 3px rgba(255, 255, 255, 0.5));
    animation: iconSpin 10s linear infinite;
}

@keyframes iconSpin {
    0%, 95% {
        transform: rotate(0deg);
    }
    97.5% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.status-dot {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
    box-shadow: 0 0 8px #00ff00;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive - Mobile Optimization */
@media (max-width: 768px) {
    body {
        cursor: auto; /* Enable default cursor on mobile */
    }

    .cursor-trail {
        display: none; /* Hide custom cursor on mobile */
    }

    .container {
        padding: 15px;
    }

    .content {
        padding: 40px 25px;
        border: 4px solid var(--primary-color);
        box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4),
                    12px 12px 0 rgba(0, 0, 0, 0.2),
                    inset 0 0 0 2px #d4d4d4;
    }

    /* Floating logos - reduced size on tablet */
    .floating-logo-1 { width: 140px; }
    .floating-logo-2 { width: 90px; }
    .floating-logo-3 { width: 120px; }
    .floating-logo-4 { width: 100px; }
    .floating-logo-5 { width: 130px; }
    .floating-logo-6 { width: 95px; }

    .logo {
        width: 140px;
    }

    .protocol-badge {
        padding: 12px 25px;
        gap: 12px;
    }

    .protocol-logo {
        width: 60px;
    }

    .protocol-text {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .title {
        font-size: 28px;
        letter-spacing: 3px;
        text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
    }

    .subtitle {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .code-input {
        font-size: 16px;
        padding: 15px 20px;
        letter-spacing: 3px;
        border: 3px solid #000000;
    }

    .code-input:focus {
        box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    }

    .submit-btn {
        font-size: 16px;
        padding: 15px;
        letter-spacing: 3px;
        border: 3px solid #000000;
        box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    }

    .submit-btn:hover {
        transform: translate(-1px, -1px);
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    }

    .submit-btn:active {
        transform: translate(1px, 1px);
        box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    }

    .footer {
        bottom: 20px;
    }

    .network-status {
        padding: 10px 20px;
        font-size: 11px;
        gap: 10px;
        box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    }

    .solana-icon {
        width: 35px;
    }

    .status-dot {
        width: 8px;
        height: 8px;
    }

    .error-message {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .content {
        padding: 30px 20px;
        border: 3px solid var(--primary-color);
        border-radius: 15px;
        box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4),
                    10px 10px 0 rgba(0, 0, 0, 0.2),
                    inset 0 0 0 2px #d4d4d4;
    }

    /* Floating logos - smaller and repositioned for mobile */
    .floating-logo {
        opacity: 0.15; /* More subtle on mobile */
    }

    .floating-logo-1 {
        width: 100px;
        top: 5%;
        left: 2%;
    }

    .floating-logo-2 {
        width: 70px;
        top: 12%;
        right: 5%;
    }

    .floating-logo-3 {
        width: 90px;
        top: 45%;
        left: 1%;
    }

    .floating-logo-4 {
        width: 75px;
        top: 50%;
        right: 3%;
    }

    .floating-logo-5 {
        width: 95px;
        bottom: 8%;
        left: 3%;
    }

    .floating-logo-6 {
        width: 70px;
        bottom: 12%;
        right: 2%;
    }

    .logo {
        width: 120px;
    }

    .protocol-badge {
        padding: 10px 20px;
        gap: 10px;
    }

    .protocol-logo {
        width: 50px;
    }

    .protocol-text {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .title {
        font-size: 22px;
        letter-spacing: 2px;
        text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
    }

    .subtitle {
        font-size: 12px;
        margin-bottom: 30px;
    }

    .code-entry-container {
        margin: 30px 0;
    }

    .code-input-wrapper {
        margin-bottom: 25px;
    }

    .code-input {
        font-size: 14px;
        padding: 12px 15px;
        letter-spacing: 2px;
    }

    .submit-btn {
        font-size: 14px;
        padding: 12px;
        gap: 10px;
    }

    .btn-arrow {
        font-size: 22px;
    }

    .info-text {
        margin-top: 30px;
    }

    .info-text p {
        font-size: 12px;
    }

    .footer {
        bottom: 15px;
    }

    .network-status {
        padding: 8px 15px;
        font-size: 10px;
        letter-spacing: 1px;
        gap: 8px;
    }

    .solana-icon {
        width: 28px;
    }

    .status-dot {
        width: 7px;
        height: 7px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .logo:hover {
        transform: none;
        filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4));
    }

    .protocol-badge:hover {
        transform: none;
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    }

    .submit-btn:hover {
        transform: none;
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
    }

    /* Better tap targets for mobile */
    .submit-btn {
        min-height: 48px;
    }

    .code-input {
        min-height: 48px;
    }
}

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

    .content {
        padding: 25px 30px;
        max-width: 500px;
    }

    .logo {
        width: 100px;
    }

    .title {
        font-size: 24px;
    }

    .footer {
        bottom: 10px;
    }

    .floating-logo {
        opacity: 0.1; /* Even more subtle in landscape */
    }
}
