/* =============================================
   PUBLIC KEY VERIFICATION - PREMIUM STYLES v2
   ============================================= */

:root {
    --bg: #060918;
    --bg-card: rgba(13, 18, 38, 0.9);
    --text: #e2e8f0;
    --text-dim: #8892b0;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --cyan: #22d3ee;
    --green: #10b981;
    --red: #f43f5e;
    --amber: #f59e0b;
    --border: rgba(99, 102, 241, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-tap-highlight-color: transparent; }
input, button, select { font-size: 16px; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Container ---- */
.public-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

/* ---- Header ---- */
.public-header { text-align: center; margin-bottom: 2rem; }

.logo { display: inline-flex; align-items: center; gap: 0.75rem; }

.logo-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.logo h1 {
    font-size: 1.6rem; font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.logo p { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---- Countdown Timer ---- */
.countdown-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeInUp 0.4s ease;
}

.countdown-label {
    font-size: 0.7rem; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

.countdown-label svg { stroke: var(--accent); }

.countdown-timer { display: flex; justify-content: center; gap: 0.35rem; }

.countdown-unit {
    background: rgba(6, 9, 24, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    min-width: 55px;
}

.countdown-value {
    font-size: 1.4rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.countdown-text {
    font-size: 0.55rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem;
}

.countdown-sep {
    font-size: 1.3rem; font-weight: 800; color: var(--accent);
    display: flex; align-items: center;
    animation: pulse 1s infinite;
}

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

/* ---- Check Card ---- */
.check-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card-glow {
    position: absolute; top: -1px; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--cyan), transparent);
    border-radius: 2px;
}

/* ---- Inputs ---- */
.input-group { margin-bottom: 1.5rem; }

.input-group label {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-weight: 600; color: var(--text-dim);
    margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1.15rem;
    background: rgba(6, 9, 24, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.1);
}

.input-group input::placeholder { color: rgba(136, 146, 176, 0.5); }

/* ---- IP Display ---- */
.ip-display { position: relative; display: flex; align-items: center; }
.ip-display input { padding-right: 7.5rem; }

.ip-badge {
    position: absolute; right: 48px; top: 50%; transform: translateY(-50%);
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.1em;
    padding: 3px 8px; border-radius: 6px;
    pointer-events: none;
}

.ip-badge.auto, .ip-badge:not(.manual) {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.ip-badge.manual {
    color: var(--amber);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ip-change-mini {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--cyan);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    min-height: 34px;
}

.ip-change-mini:hover {
    background: rgba(34, 211, 238, 0.2);
    transform: translateY(-50%) scale(1.05);
}

/* ---- IP Mode Toggle ---- */
.ip-mode-toggle { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.ip-mode-btn {
    flex: 1;
    padding: 0.5rem;
    background: rgba(6, 9, 24, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    min-height: 38px;
}

.ip-mode-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--accent);
}

.ip-mode-btn:hover:not(.active) { background: rgba(99, 102, 241, 0.08); }

/* ---- Buttons ---- */
.button-group { display: flex; gap: 0.75rem; }

.btn-check {
    flex: 1;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none; border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease;
    min-height: 48px;
}

.btn-check .btn-text, .btn-check .btn-loading {
    display: inline-flex; align-items: center; gap: 0.5rem;
}

.btn-check:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4); }
.btn-check:active { transform: translateY(0); }
.btn-check:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-change-ip {
    padding: 0.7rem 1.25rem;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 10px;
    color: var(--cyan);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 44px;
}

.btn-change-ip:hover { background: rgba(34, 211, 238, 0.15); transform: translateY(-1px); }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ---- Result ---- */
.result-area { margin-top: 1.5rem; animation: fadeInUp 0.4s ease; }

.result-card {
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.result-card.success { background: rgba(16, 185, 129, 0.07); border: 1px solid rgba(16, 185, 129, 0.2); }
.result-card.error { background: rgba(244, 63, 94, 0.07); border: 1px solid rgba(244, 63, 94, 0.2); }
.result-card.warning { background: rgba(245, 158, 11, 0.07); border: 1px solid rgba(245, 158, 11, 0.2); }
.result-card.info { background: rgba(34, 211, 238, 0.07); border: 1px solid rgba(34, 211, 238, 0.2); }

.result-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.result-header h3 { font-size: 1rem; font-weight: 700; }
.result-header h3.success { color: var(--green); }
.result-header h3.error { color: var(--red); }
.result-header h3.warning { color: var(--amber); }
.result-header h3.info { color: var(--cyan); }

.result-info { display: grid; gap: 0.5rem; }
.result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.result-row:last-child { border-bottom: none; }
.result-row .rl { color: var(--text-dim); font-size: 0.8rem; }
.result-row .rv { color: var(--text); font-size: 0.85rem; font-weight: 600; text-align: right; }

/* ---- Contact Section ---- */
.contact-section {
    background: rgba(13, 18, 38, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.contact-header {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.contact-header h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.contact-grid { display: grid; gap: 0.6rem; }

.contact-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: rgba(6, 9, 24, 0.4);
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none; color: inherit;
    cursor: pointer;
}

.contact-item:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(4px);
}

.contact-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.contact-icon.tg { background: rgba(34, 211, 238, 0.1); color: var(--cyan); }
.contact-icon.support { background: rgba(99, 102, 241, 0.1); color: var(--accent-light); }
.contact-icon.channel { background: rgba(245, 158, 11, 0.1); color: var(--amber); }

.contact-info { flex: 1; min-width: 0; }
.contact-label { font-size: 0.6rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-value { font-size: 0.85rem; font-weight: 600; color: var(--text); }

.contact-arrow { color: var(--text-dim); opacity: 0; transition: all 0.3s ease; }
.contact-item:hover .contact-arrow { opacity: 1; transform: translateX(4px); }

/* ---- Guide Link Card ---- */
.guide-link-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.guide-link-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.guide-link-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.guide-link-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.guide-link-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.guide-link-desc {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.guide-link-arrow {
    color: var(--text-dim);
    opacity: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.guide-link-card:hover .guide-link-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ---- Footer ---- */
.public-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.public-footer p { font-size: 0.7rem; color: rgba(136, 146, 176, 0.4); margin-bottom: 0.25rem; }
.public-footer .creator { color: rgba(136, 146, 176, 0.3); }
.public-footer .creator strong { color: rgba(136, 146, 176, 0.5); }

/* ---- Custom Dialog (replaces browser confirm/alert) ---- */
.dialog-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}

.dialog-overlay.active { display: flex; }

.dialog-box {
    background: rgba(13, 18, 38, 0.98);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
    animation: scaleIn 0.25s ease;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.dialog-icon { margin-bottom: 1rem; }
.dialog-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.dialog-box p { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 1.5rem; line-height: 1.6; }

.dialog-actions { display: flex; gap: 0.75rem; }

.dialog-btn-cancel {
    flex: 1;
    padding: 0.7rem 1rem;
    background: rgba(136, 146, 176, 0.1);
    border: 1px solid rgba(136, 146, 176, 0.2);
    border-radius: 10px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    min-height: 44px;
}

.dialog-btn-cancel:hover { background: rgba(136, 146, 176, 0.15); }

.dialog-btn-confirm {
    flex: 1;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none; border-radius: 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    min-height: 44px;
}

.dialog-btn-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3); }

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed; top: 1rem; right: 1rem;
    z-index: 300;
    display: flex; flex-direction: column; gap: 0.5rem;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 2rem);
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; font-weight: 500;
    pointer-events: all;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.toast.show { transform: translateX(0); opacity: 1; }

.toast-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--green); }
.toast-error { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.3); color: var(--red); }
.toast-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--amber); }
.toast-info { background: rgba(34, 211, 238, 0.15); border: 1px solid rgba(34, 211, 238, 0.3); color: var(--cyan); }

.toast-icon { flex-shrink: 0; display: flex; }
.toast-msg { flex: 1; }

/* ---- Notification Popup ---- */
.notif-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}

.notif-overlay.active { display: flex; }

.notif-popup {
    background: rgba(13, 18, 38, 0.95);
    border: 1px solid var(--accent);
    border-radius: 20px;
    width: 100%; max-width: 440px;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
    overflow: hidden;
}

.notif-header {
    padding: 1.25rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    display: flex; align-items: center; gap: 0.75rem;
}

.notif-header h3 { font-size: 1rem; font-weight: 700; }

.notif-body {
    padding: 1.5rem; font-size: 0.88rem; line-height: 1.8;
    color: var(--text-dim);
    max-height: 300px; overflow-y: auto;
}

.notif-body strong { color: var(--text); }
.notif-body a { color: var(--cyan); text-decoration: underline; }
.notif-body ul, .notif-body ol { padding-left: 1.5rem; margin-bottom: 0.5rem; }
.notif-body h1, .notif-body h2, .notif-body h3 { color: var(--text); margin-bottom: 0.5rem; }

.notif-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(99, 102, 241, 0.1); text-align: center; }

.notif-btn {
    padding: 0.7rem 2.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none; border-radius: 10px;
    color: white; font-family: 'Inter', sans-serif;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    min-height: 44px;
}

.notif-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3); }

/* ---- Blocked Page ---- */
.blocked-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; position: relative; z-index: 1;
}

.blocked-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(244, 63, 94, 0.1);
}

.blocked-card h1 { color: var(--red); font-size: 1.3rem; margin-bottom: 0.75rem; }
.blocked-card p { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.5rem; }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .check-card { padding: 1.5rem; }
    .button-group { flex-direction: column; }
    .countdown-unit { min-width: 48px; padding: 0.5rem 0.6rem; }
    .countdown-value { font-size: 1.2rem; }
    .dialog-actions { flex-direction: column; }
    .toast-container { right: 0.5rem; top: 0.5rem; max-width: calc(100% - 1rem); }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.2); border-radius: 3px; }
