/* ============================================
   DUMMYLABS — DESIGN SYSTEM & STYLES
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #09090b;
    --bg-secondary: #0f0f12;
    --bg-card: rgba(15, 15, 20, 0.85);
    --bg-card-hover: rgba(20, 20, 28, 0.95);
    --bg-input: rgba(10, 10, 14, 0.9);
    --bg-navbar: rgba(9, 9, 11, 0.75);

    --accent: #8b5cf6;
    --accent-dark: #6366f1;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --accent-glow-strong: rgba(139, 92, 246, 0.3);
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #6366f1);

    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --border-color: rgba(139, 92, 246, 0.12);
    --border-color-hover: rgba(139, 92, 246, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.1);
    --shadow-glow-strong: 0 0 40px rgba(139, 92, 246, 0.2);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --navbar-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ambient background glow */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    color: inherit;
    outline: none;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: background var(--transition-base);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    transition: opacity var(--transition-fast);
}

.nav-logo:hover {
    opacity: 0.85;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--bg-primary);
}

.text-accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.mobile-menu-btn {
    display: none;
    color: var(--text-secondary);
    padding: 8px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding-top: var(--navbar-height);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page {
    animation: fadeInUp 0.4s ease forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height));
    padding: 60px 24px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(139, 92, 246, 0.05);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 32px;
    animation: fadeIn 0.6s ease;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: slideUp 0.6s ease 0.1s both;
}

.hero-title .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 40px;
    line-height: 1.7;
    animation: slideUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: slideUp 0.6s ease 0.3s both;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--border-color-hover);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    padding: 60px 24px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(15, 15, 20, 0.5);
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    animation: countUp 0.6s ease forwards;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    box-shadow: var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.tool-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tool-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
}

.footer-logo svg {
    color: var(--accent);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent);
}

/* ============================================
   TOOL PAGE LAYOUT
   ============================================ */
.tool-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.tool-page-wide {
    max-width: 1000px;
}

.tool-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-page-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 20px;
}

.tool-page-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.tool-page-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ============================================
   FORM CARD
   ============================================ */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Toggle Buttons */
.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.toggle-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: center;
}

.toggle-btn.active {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border-color: transparent;
}

.toggle-btn:hover:not(.active) {
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ============================================
   RESULTS AREA
   ============================================ */
.results-area {
    margin-top: 24px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.results-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.results-count {
    font-size: 13px;
    color: var(--text-muted);
}

.results-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
}

.results-box:empty::before {
    content: 'Results will appear here...';
    color: var(--text-muted);
}

.results-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ============================================
   COUNTRY GRID (Address Generator)
   ============================================ */
.country-search {
    margin-bottom: 24px;
    position: relative;
}

.country-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.country-search .form-input {
    padding-left: 44px;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.country-card {
    padding: 16px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.country-card:hover {
    border-color: var(--border-color);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.country-card.active {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: var(--shadow-glow);
}

.country-flag {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.country-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.country-card.active .country-name {
    color: var(--accent);
}

/* Address Result */
.address-result {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.address-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.address-field:last-child {
    border-bottom: none;
}

.address-field-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 120px;
}

.address-field-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.address-field-copy {
    margin-left: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 4px;
}

.address-field-copy:hover {
    color: var(--accent);
}

/* ============================================
   TEMP MAIL
   ============================================ */
.email-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.email-address {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    word-break: break-all;
}

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

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.inbox-title {
    font-size: 16px;
    font-weight: 700;
}

.inbox-count {
    font-size: 13px;
    color: var(--text-muted);
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.inbox-item:hover {
    border-color: var(--border-color);
    background: var(--bg-card-hover);
}

.inbox-item-from {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.inbox-item-subject {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.inbox-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

.inbox-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.inbox-empty svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.inbox-empty p {
    font-size: 14px;
}

/* Mail body */
.mail-body {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 16px;
}

.mail-body-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.mail-body-from {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mail-body-subject {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mail-body-date {
    font-size: 12px;
    color: var(--text-muted);
}

.mail-body-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   CHAT
   ============================================ */
.chat-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 24px;
}

.chat-login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
}

.chat-login-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.chat-login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height) - 40px);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 24px;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-room-name {
    font-size: 16px;
    font-weight: 700;
}

.chat-online {
    font-size: 13px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-input);
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
}

.chat-message-other {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    align-self: flex-start;
}

.chat-message-self {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    align-self: flex-end;
}

.chat-message-user {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.chat-message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.chat-send-btn:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ============================================
   FLOATING BUTTON
   ============================================ */
.floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    z-index: 999;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.floating-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-strong);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    z-index: 9999;
    transition: transform var(--transition-base);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   LOADING & SPINNER
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.loading-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   BIN LOOKUP RESULT
   ============================================ */
.bin-info {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bin-info-item {
    display: flex;
    flex-direction: column;
}

.bin-info-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bin-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   NETWORK SELECTOR (Extraps)
   ============================================ */
.network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.network-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.network-card:hover {
    border-color: var(--border-color);
}

.network-card.active {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
}

.network-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.network-card-name {
    font-size: 13px;
    font-weight: 600;
}

/* ============================================
   BIN GENERATOR
   ============================================ */
.bin-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.bin-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.bin-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.bin-result-card:hover {
    border-color: var(--border-color);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.bin-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bin-number {
    font-size: 20px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.bin-brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    color: #fff;
}

.bin-result-bank {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.bin-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bin-result-type {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bin-result-type.credit {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.bin-result-type.debit {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.bin-result-country {
    font-size: 12px;
    color: var(--text-muted);
}

.bin-result-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
/* ============================================
   LEGAL PAGES (Privacy, Terms, API Docs)
   ============================================ */
.legal-page .tool-page-header {
    margin-bottom: 40px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 16px;
}

.legal-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.legal-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin: 16px 0 8px;
}

.legal-section p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.legal-section ul li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.legal-section code {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}

.api-code {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    font-size: 13px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--accent);
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    margin-top: 12px;
}

.api-notice {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 12px;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.api-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.api-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.api-table tr:last-child td {
    border-bottom: none;
}

/* ============================================
   PERSONA GENERATOR
   ============================================ */
.persona-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.persona-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.persona-check {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
    padding: 6px 10px; border-radius: var(--radius-sm);
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}
.persona-check:hover { border-color: var(--border-color); }
.persona-check input { accent-color: var(--accent); }

.persona-hero-card {
    display: flex; align-items: center; gap: 24px;
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.02));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); padding: 32px; margin-bottom: 24px;
}

.persona-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    border: 3px solid var(--accent); object-fit: cover;
    box-shadow: 0 0 30px rgba(139,92,246,0.3);
}

.persona-name { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.persona-meta { font-size: 13px; color: var(--text-muted); margin: 2px 0; }

.persona-sections-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; margin-bottom: 24px;
}

.persona-section {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 20px;
    transition: all var(--transition-fast);
}
.persona-section:hover { border-color: var(--border-color); }

.persona-section-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; font-weight: 700; margin-bottom: 14px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border-subtle);
}

.persona-field {
    display: flex; align-items: center; padding: 6px 0; gap: 8px;
}
.persona-field-label {
    font-size: 12px; color: var(--text-muted); min-width: 110px; font-weight: 500;
}
.persona-field-value {
    flex: 1; font-size: 13px; color: var(--text-primary); font-weight: 500; word-break: break-all;
}
.persona-copy-btn {
    background: none; border: none; cursor: pointer; font-size: 12px; padding: 2px;
    opacity: 0.4; transition: opacity var(--transition-fast);
}
.persona-copy-btn:hover { opacity: 1; }

.persona-export-bar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
    padding: 16px; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.persona-disclaimer {
    text-align: center; font-size: 12px; color: var(--text-muted);
    padding: 16px; display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(139,92,246,0.05); border-radius: var(--radius-md); margin-top: 16px;
}

.persona-saved-header {
    display: flex; justify-content: space-between; align-items: center;
    margin: 24px 0 12px;
}
.persona-saved-header h3 { font-size: 16px; font-weight: 700; }

.persona-saved-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.persona-saved-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); transition: all var(--transition-fast);
}
.persona-saved-card:hover { border-color: var(--border-color); }
.persona-saved-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent);
}

.logo-icon { font-size: 12px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--bg-navbar);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .persona-controls {
        grid-template-columns: 1fr 1fr;
    }

    .persona-hero-card {
        flex-direction: column;
        text-align: center;
    }

    .persona-sections-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 24px;
    }

    .stat-item {
        min-width: 120px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .network-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bin-filters {
        grid-template-columns: 1fr 1fr;
    }

    .bin-results-grid {
        grid-template-columns: 1fr;
    }

    .bin-info {
        grid-template-columns: 1fr;
    }

    .address-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .address-field-value {
        text-align: left;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }

    .toggle-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 20px;
    }

    .tool-page {
        padding: 40px 16px 60px;
    }

    .hero {
        padding: 40px 16px;
    }
}
