/* Access Overlay Styles for Pixkulls */
@import url('https://fonts.googleapis.com/css2?family=Poppins&family=Tiny5&display=swap');

#accessOverlay {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, #000000 0%, #1a0033 60%, #0f002c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-width: 100vw;
    overflow: hidden;
}

/* Animated grid background */
#accessOverlay::before {
    content: '';
    position: absolute;
    inset: 0;
  /*  background-image: 
        linear-gradient(rgba(95, 202, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 202, 255, 0.01) 1px, transparent 1px);*/
    background-size: 32px 32px;
    animation: gridScroll 15s linear infinite;
    pointer-events: none;
}

@keyframes gridScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(32px, 32px); }
}

/* Floating particles */
#accessOverlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle, #5fcaff 1px, transparent 1px),
        radial-gradient(circle, #ff79b0 1px, transparent 1px),
        radial-gradient(circle, #a855f7 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px, 100px 100px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.15;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.access-modal-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 96vw;
    max-height: 96vh;
    z-index: 10;
}

/* Decorative border frame */
/* decorative border frame removed */

/* Main modal box */
.access-modal-box {
    background: linear-gradient(135deg, #1a0033 0%, #240038 100%);
 /*   box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(95, 202, 255, 0.3),
        inset 0 0 60px rgba(95, 202, 255, 0.05); */
    min-width: 300px;
    max-width: 420px;
    padding: 42px 36px 36px;
    border-radius: 12px;
    border: 1px solid #5fcaff;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.access-modal-box::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    padding: 3px;
    background: linear-gradient(45deg, #5fcaff, #ff79b0, #a855f7, #5fcaff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.4;
    animation: borderRotate 4s linear infinite;
    pointer-events: none;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Lock icon */
.access-lock-icon {
    margin-bottom: 0;
    animation: lockFloat 2.5s ease-in-out infinite;
}

@keyframes lockFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.access-lock-icon svg {
    display: block;
    margin: 0 auto;
  /*  filter: drop-shadow(0 4px 12px rgba(95, 202, 255, 0.8)); */
}

/* If the lock icon is an image (blockpreview.png), style consistently */
.access-lock-icon img {
    display: block;
    margin: 0 auto;
    width: 64px;
    height: 64px;
    object-fit: contain;
 /*   filter: drop-shadow(0 4px 12px rgba(95, 202, 255, 0.8)); */
}

/* Title */
.access-title {
    color: #5fcaff;
    font-family: 'Jacquarda Bastarda 9', cursive, monospace;
    font-size: 2.4em;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 3px;
 /*   text-shadow: 
        0 2px 8px #240038,
        0 0 12px rgba(95, 202, 255, 0.8),
        2px 2px 0 #ff79b0; 
    animation: titleGlow 2s ease-in-out infinite;*/
}

@keyframes titleGlow {
  /*   0%, 100% { text-shadow: 0 2px 8px #240038, 0 0 12px rgba(95, 202, 255, 0.8), 2px 2px 0 #ff79b0; }
    50% { text-shadow: 0 2px 8px #240038, 0 0 20px rgba(95, 202, 255, 1), 2px 2px 0 #a855f7; }
    */
}

/* Override for the main page title when using the access-title styles */
.access-title.main-title {
    color: #eb02eb;
    font-size: 3.8em;
    letter-spacing: 5px;
    margin-top: 6px;
    /* Blue-contrasting shadow: darker base + bright cyan glow */
  /*  text-shadow:
        0 3px 10px rgba(6, 24, 64, 0.9),
        0 0 22px rgba(95, 202, 255, 0.95),
        2px 2px 0 rgba(10, 32, 96, 0.6);
    animation: titleGlow 2s ease-in-out infinite; */
}

@media (max-width: 768px) {
    .access-title.main-title {
        font-size: 2.1em;
        letter-spacing: 2px;
    }
}

/* Description */
.access-description {
    color: #c4b5fd;
    text-align: center;
    font-size: 0.85em;
    line-height: 1.45;
    margin-bottom: 20px;
  /*  text-shadow: 0 1px 8px #0f002c; */
    max-width: 340px;
    font-family: 'Poppins', monospace;
}

/* Contract info badge */
.access-contract-info {
    /* Keep contract info simple inside the panel; styling moved to the panel wrapper */
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0;
        margin: 8px 6px 2px 6px;
    text-align: center;
    font-size: 0.78em;
    line-height: 1.8;
    color: #c4b5fd;
    font-family: 'Press Start 2P', monospace;
}

.access-contract-info span {
    color: #ff79b0;
    font-weight: normal;
}

/* Input field */
.access-input {
    width: 100%;
    font-size: 1em;
    padding: 12px 10px;
    border-radius: 8px;
    border: 2px solid #5fcaff;
    margin-bottom: 16px;
    background: rgba(36, 0, 56, 0.8);
    color: #fff;
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(168, 85, 247, 0.3) inset,
        0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85em;
}

.access-input::placeholder {
    color: #a855f7;
    opacity: 0.6;
}

.access-input:focus {
    border-color: #ff79b0;
    box-shadow: 
        0 0 0 3px rgba(255, 121, 176, 0.3) inset,
        0 0 16px rgba(255, 121, 176, 0.4);
    background: rgba(36, 0, 56, 1);
}

/* Button */
.access-button {
    width: 100%;
    font-size: 1em;
    padding: 14px 0;
    background: linear-gradient(135deg, #5fcaff 0%, #a855f7 100%);
    color: #1a0033;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive, monospace;
    font-size: 0.9em;
  /*  box-shadow: 
        0 4px 12px rgba(95, 202, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);*/
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.access-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.access-button:hover {
    background: linear-gradient(135deg, #a855f7 0%, #ff79b0 100%);
  /*  box-shadow: 
        0 6px 20px rgba(168, 85, 247, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4); */
    transform: translateY(-2px);
}

.access-button:hover::before {
    transform: translateX(100%);
}

.access-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(95, 202, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Buy link styled to match modal buttons but slightly different (outlined) */
.access-buy-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin: 12px 0 16px 0;
    padding: 12px 0;
    border-radius: 8px;
    color: #5fcaff;
    background: transparent;
    border: 2px solid rgba(95, 202, 255, 0.18);
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85em;
    transition: all 0.18s ease;
}
.access-buy-link:hover {
    background: linear-gradient(135deg, #a855f7 0%, #ff79b0 100%);
    border-color: rgba(95, 202, 255, 0.36);
    color: #e6f9ff;
    transform: translateY(-2px);
}


/* Result message */
.access-result {
    margin-top: 16px;
    min-height: 28px;
    text-align: center;
    font-size: 0.95em;
  /*  text-shadow: 0 1px 8px #0f002c; */
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8em;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.access-result.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: successPulse 0.5s ease;
}

.access-result.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    animation: shake 0.4s ease;
}

.access-result.loading {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Subtle container that groups contract + buy button */
.access-info-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    margin-bottom: 12px;
}
body.day .access-info-panel {
    background: rgba(176, 176, 180, 0.438);
    border: 1px solid rgba(11,37,64,0.04);
}

@media (max-width: 520px) {
    .access-info-panel {
        padding: 6px;
    }
}

/* Unlock animation */
@keyframes unlockFade {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

.access-buy-link {
    display: inline-block;
    width: 100%;
    margin: 0;
    text-align: center;
    padding: 12px 14px;
    border-radius: 8px;
    color: #1a0033;
    background: linear-gradient(135deg, #5fcaff 0%, #a855f7 100%);
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.95em;
    transition: all 0.18s ease;
    box-shadow: 0 6px 18px rgba(95, 202, 255, 0.14);
}
.access-buy-link:hover {
    filter: brightness(1.02);
    transform: translateY(-2px);
}
    .access-input {
        font-size: 0.75em;
        padding: 10px 8px;
    }

    .access-button {
        font-size: 0.8em;
        padding: 12px 0;
    }

    .access-lock-icon svg {
        width: 48px;
        height: 48px;
    }

    .access-lock-icon img {
        width: 48px;
        height: 48px;
    }

/* Day theme overrides for the access overlay */
body.day #accessOverlay {
    background: #ffffff;
}

body.day #accessOverlay::before {
    background-image: 
        linear-gradient(rgba(11, 37, 64, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 37, 64, 0.03) 1px, transparent 1px);
    background-size: 12px 12px;
}

body.day #accessOverlay::after {
    opacity: 0.06;
}

body.day .access-modal-box {
    background: #ffffff;
    border: 1px solid #7dafff;
    color: #0b2540;
    box-shadow: 0 8px 24px rgba(16,24,40,0.06);
}

body.day .access-modal-box::before {
    opacity: 0.22;
    background: linear-gradient(45deg, #7aa7ff, #ffd1e8, #caa8ff, #7aa7ff);
}



body.day .access-description {
    color: #334155;
    text-shadow: none;
}

body.day .access-contract-info { color: #334155; }
body.day .access-contract-info span { color: #0b4a78; }

body.day .access-input {
    background: #ffffff;
    color: #0b2540;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

body.day .access-input::placeholder { color: #94a3b8; opacity: 1; }

body.day .access-input:focus {
    border-color: #7aa7ff;
    box-shadow: 0 0 0 4px rgba(122,167,255,0.12) inset;
    background: #ffffff;
}

body.day .access-button {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #ffffff;
}

body.day .access-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* Make the Buy NFT button prominent and blue in day theme */
body.day .access-buy-link {
    display: inline-block;
    width: 100%;
    margin: 0;
    text-align: center;
    padding: 12px 14px;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border: none;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.95em;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 160ms ease;
    box-shadow: 0 8px 20px rgba(59,130,246,0.18);
}

body.day .access-buy-link:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 40px rgba(59,130,246,0.28);
    filter: brightness(1.06);
}

body.day .access-buy-link:focus {
    outline: none;
    box-shadow: 0 18px 40px rgba(59,130,246,0.28), 0 0 0 4px rgba(59,130,246,0.12);
}

body.day .access-result {
    background: rgba(8,10,23,0.03);
    color: #0b2540;
    border: 1px solid rgba(11,37,64,0.04);
}

body.day .access-result.success {
    color: #065f46;
    background: rgba(6,95,70,0.06);
    border: 1px solid rgba(6,95,70,0.12);
}

body.day .access-result.error {
    color: #991b1b;
    background: rgba(255,203,203,0.06);
    border: 1px solid rgba(255,203,203,0.12);
}

body.day .access-result.loading {
    color: #b45309;
    background: rgba(255,243,205,0.06);
    border: 1px solid rgba(255,243,205,0.12);
}

/* Position theme toggle inside modal box so it's visible while overlay is shown */
.access-modal-box .theme-toggle,
.access-modal-box .overlay-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 12;
    width: 38px;
    height: 38px;
    padding: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(240,240,255,0.02));
    border: 1px solid rgba(11,37,64,0.06);
    color: #fff;
    border-radius: 8px;
}
body.day .access-modal-box .theme-toggle,
body.day .access-modal-box .overlay-toggle {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(11,74,120,0.06);
    color: #0b2540;
     border: 1px solid rgba(62, 174, 255, 0.452);
}

.access-modal-box .theme-toggle i { font-size: 16px; }

/* In day mode, make the overlay toggle fit the light style */
body.day .access-modal-box .theme-toggle {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(11,74,120,0.06);
    color: #0b2540;
}
