/* ==============================================================================
   Custom Styles & Micro-Animations for Social Card Generator / Cloaker
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --brand-primary: #6366f1;
    --brand-cyan: #06b6d4;
    --brand-accent: #38bdf8;
    --bg-dark: #090d16;
    --card-dark: #0f172a;
    --border-dark: #1e293b;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: #f8fafc;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel-elevated {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Glow Utilities */
.glow-primary {
    box-shadow: 0 0 25px -4px rgba(99, 102, 241, 0.4);
}

.glow-cyan {
    box-shadow: 0 0 25px -4px rgba(6, 182, 212, 0.4);
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Drag & Drop Upload Zone */
.dropzone-container {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: repeating-linear-gradient(0deg, #334155, #334155 8px, transparent 8px, transparent 16px), 
                      repeating-linear-gradient(90deg, #334155, #334155 8px, transparent 8px, transparent 16px), 
                      repeating-linear-gradient(180deg, #334155, #334155 8px, transparent 8px, transparent 16px), 
                      repeating-linear-gradient(270deg, #334155, #334155 8px, transparent 8px, transparent 16px);
    background-size: 1.5px 100%, 100% 1.5px, 1.5px 100% , 100% 1.5px;
    background-position: 0 0, 0 0, 100% 0, 0 100%;
    background-repeat: no-repeat;
}

.dropzone-container.is-dragover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.08);
    transform: scale(1.01);
}

/* Authentic Twitter / X Preview Specifics */
.tweet-card-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tweet-card-dark {
    background-color: #000000;
    border: 1px solid #2f3336;
    color: #e7e9ea;
}

.tweet-card-dark .card-domain-badge {
    background: rgba(0, 0, 0, 0.77);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.tweet-card-light {
    background-color: #ffffff;
    border: 1px solid #cfd9de;
    color: #0f1419;
}

.tweet-card-light .card-domain-badge {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.aspect-twitter-card {
    aspect-ratio: 1.91 / 1;
}

/* Monospace font for generated URLs and slugs */
.font-mono-code {
    font-family: 'JetBrains Mono', monospace;
}

/* Animations */
@keyframes pulseSubtle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.pulse-indicator {
    animation: pulseSubtle 3s infinite ease-in-out;
}

/* Shimmer placeholder */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer-placeholder {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ==============================================================================
   Mobile Responsiveness & Clean Link Layout (<640px)
   ============================================================================== */
@media (max-width: 639px) {
    /* Responsive header elements */
    .mobile-header-brand {
        max-width: calc(100% - 110px);
    }

    /* Modal Shareable Link Box: Stack vertically on small screens */
    .shareable-link-box {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.625rem !important;
        gap: 0.5rem !important;
    }

    .shareable-link-input {
        width: 100% !important;
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    .shareable-copy-btn {
        width: 100% !important;
        padding: 0.625rem 1rem !important;
        justify-content: center !important;
    }
}

/* Input text truncation & smooth scrolling helper */
.shareable-link-input {
    text-overflow: ellipsis;
    min-width: 0;
}

.shareable-link-input:focus {
    text-overflow: clip;
}

