/* ================================================================
   criscuolo.online — Meu IP e Operadora
   ================================================================ */

:root {
    --brand-gold: #D4A843;
    --brand-gold-light: #E0BE6A;
    --brand-gold-dark: #B8922F;
    --brand-gradient: linear-gradient(135deg, #D4A843, #E0BE6A, #D4A843);
    --cta-gradient: linear-gradient(135deg, #D4A843, #B8922F);

    --bg-primary: #16161E;
    --bg-secondary: #1C1C26;
    --bg-card: rgba(24, 24, 32, 0.88);
    --bg-card-border: rgba(212, 168, 67, 0.12);
    --bg-card-border-hover: rgba(212, 168, 67, 0.3);
    --bg-input: #141420;

    --text-primary: #F2F0EB;
    --text-secondary: #9B978E;
    --text-muted: #6B6760;
    --text-accent: #D4A843;

    --color-success: #22C55E;
    --color-error: #EF4444;
    --color-warning: #F97316;

    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-xs: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 40px rgba(212, 168, 67, 0.1);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-button: 0 4px 15px rgba(212, 168, 67, 0.25);
    --shadow-button-hover: 0 6px 25px rgba(212, 168, 67, 0.35);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ================================================================
   Reset
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }

/* ================================================================
   Fundo decorativo
   ================================================================ */
.bg-effects { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; }
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(212,168,67,0.18) 0%, transparent 70%); top: -200px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(184,146,47,0.12) 0%, transparent 70%); bottom: -150px; left: -100px; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(212,168,67,0.08) 0%, transparent 70%); top: 50%; left: 15%; }
.orb-4 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(34,197,94,0.06) 0%, transparent 70%); bottom: 15%; right: 15%; }

.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(212,168,67,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(212,168,67,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ================================================================
   Mouse Glow
   ================================================================ */
.mouse-glow {
    position: fixed; width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,168,67,0.06) 0%, rgba(212,168,67,0.02) 40%, transparent 70%);
    transform: translate(-50%, -50%); pointer-events: none; z-index: 1;
    opacity: 0; transition: opacity 0.5s ease;
}
.mouse-glow.visible { opacity: 1; }

/* ================================================================
   Header
   ================================================================ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0 24px;
    background: rgba(22,22,30,.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212,168,67,.08);
    transition: var(--transition);
}
.header.scrolled { background: rgba(22,22,30,.95); border-bottom-color: rgba(212,168,67,.15); }
.header-inner { max-width: 1100px; margin: 0 auto; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-img-wrapper {
    width: 44px; height: 44px;
    background: radial-gradient(circle,rgba(255,255,255,.95) 60%,rgba(255,255,255,.6) 80%,transparent 100%);
    border-radius: 50%; padding: 5px;
    box-shadow: 0 0 16px rgba(212,168,67,.15);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: var(--transition);
}
.logo-img-wrapper:hover { box-shadow: 0 0 24px rgba(212,168,67,.25); }
.logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.logo-text-group { display: flex; align-items: baseline; }
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.logo-text-accent { font-size: 1.25rem; font-weight: 800; color: var(--brand-gold); letter-spacing: -0.02em; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: .9rem; font-weight: 600; color: var(--text-secondary); padding: 8px 14px; border-radius: var(--border-radius-xs); transition: var(--transition); }
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link-active { color: var(--brand-gold) !important; background: rgba(212,168,67,.08); }
.nav-cta { font-size: .9rem; font-weight: 700; color: #0C0C0E; background: var(--cta-gradient); padding: 9px 18px; border-radius: var(--border-radius-sm); box-shadow: var(--shadow-button); transition: var(--transition); margin-left: 8px; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-button-hover); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ================================================================
   Utilities
   ================================================================ */
.gradient-text { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-label { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-gold); margin-bottom: 8px; }
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; transition: var(--transition); }
.breadcrumb:hover { color: var(--text-secondary); }

[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* ================================================================
   Page layout
   ================================================================ */
.page-main { position: relative; z-index: 2; padding-top: 64px; }

.page-hero { padding: 56px 24px 48px; }
.page-hero-inner { max-width: 820px; margin: 0 auto; }
.page-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.page-subtitle { font-size: 1rem; color: var(--text-secondary); max-width: 520px; line-height: 1.7; }

.page-content { padding: 0 24px 80px; }

/* ================================================================
   IP Wrapper
   ================================================================ */
.ip-wrapper { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

/* ================================================================
   Card principal do IP
   ================================================================ */
.ip-main-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    padding: 36px 40px;
    position: relative;
    overflow: hidden;
}

.ip-main-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--brand-gradient);
    opacity: 0.7;
}

/* Loading */
.ip-loading {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 12px 0;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--bg-card-border);
    border-top-color: var(--brand-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.ip-error {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.error-icon { color: var(--color-error); flex-shrink: 0; }

.error-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.error-text strong { font-size: 0.95rem; color: var(--text-primary); }
.error-text span   { font-size: 0.83rem; color: var(--text-muted); }

/* Content */
.ip-content {}

.ip-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ip-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-version-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(212,168,67,0.12);
    border: 1px solid rgba(212,168,67,0.3);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand-gold);
    text-transform: uppercase;
}

.ip-status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
    animation: pulse-green 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
    50%       { opacity: 0.6; box-shadow: 0 0 4px rgba(34,197,94,0.2); }
}

.ip-status-text { font-size: 0.8rem; color: var(--color-success); font-weight: 600; }

.ip-actions { display: flex; gap: 8px; }

.btn-copy-ip,
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--border-radius-xs);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-copy-ip:hover,
.btn-refresh:hover {
    border-color: var(--bg-card-border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-copy-ip.copied {
    color: var(--color-success);
    border-color: rgba(34,197,94,0.3);
    background: rgba(34,197,94,0.06);
}

/* IP Address grande */
.ip-address-display {
    margin: 8px 0 14px;
}

.ip-address {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    word-break: break-all;
}

.ip-timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ================================================================
   Grid de informações
   ================================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-card);
    padding: 20px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
    animation: fadeUp 0.4s ease both;
}

.info-card:hover {
    border-color: var(--bg-card-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), 0 0 20px rgba(212,168,67,0.06);
}

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

.info-card:nth-child(1) { animation-delay: 0.05s; }
.info-card:nth-child(2) { animation-delay: 0.10s; }
.info-card:nth-child(3) { animation-delay: 0.15s; }
.info-card:nth-child(4) { animation-delay: 0.20s; }
.info-card:nth-child(5) { animation-delay: 0.25s; }
.info-card:nth-child(6) { animation-delay: 0.30s; }

.info-card-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.12);
    border-radius: var(--border-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-gold);
}

.info-card-body { flex: 1; min-width: 0; }

.info-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.info-card-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.info-card-value.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent;
    height: 16px;
    width: 80%;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.info-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
}

.flag-emoji {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-right: 4px;
}

/* ================================================================
   Info section (nota explicativa)
   ================================================================ */
.info-section {
    background: rgba(212,168,67,0.04);
    border: 1px solid rgba(212,168,67,0.1);
    border-radius: var(--border-radius-sm);
    padding: 20px 24px;
}

.info-section-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.info-icon {
    flex-shrink: 0;
    color: var(--brand-gold);
    opacity: 0.7;
    margin-top: 1px;
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.info-text strong { color: var(--text-secondary); font-weight: 600; }

/* ================================================================
   Toast
   ================================================================ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(30,30,40,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: 40px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { color: var(--color-success); flex-shrink: 0; }

/* ================================================================
   Footer
   ================================================================ */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--bg-card-border); padding: 32px 24px; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-logo { font-size: 1rem; font-weight: 700; color: var(--text-secondary); }
.footer-accent { color: var(--brand-gold); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-nav a:hover { color: var(--text-secondary); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ================================================================
   Responsivo
   ================================================================ */
@media (max-width: 720px) {
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .ip-address { font-size: clamp(1.6rem, 6vw, 2.4rem); }
    .ip-main-card { padding: 26px 24px; }
}

@media (max-width: 480px) {
    .info-grid { grid-template-columns: 1fr; }
    .ip-header-row { flex-direction: column; align-items: flex-start; }
    .page-hero { padding: 40px 16px 32px; }
    .page-content { padding: 0 16px 60px; }
    .ip-address { font-size: clamp(1.4rem, 7vw, 2rem); }
}

@media (max-width: 640px) {
    .nav { display: none; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: rgba(22,22,30,.97); backdrop-filter: blur(20px); padding: 16px; border-bottom: 1px solid var(--bg-card-border); z-index: 99; }
    .nav.open { display: flex; }
    .nav-toggle { display: flex; }
    .footer-inner { flex-direction: column; text-align: center; }
}
