/* ========================================================
   1. DESIGN TOKENS & VARIABLES
   ======================================================== */
:root {
    --bg-main: #0B0F19;
    --bg-surface: #111827;
    --bg-card: #1F2937;
    --bg-card-hover: #2D3748;
    
    --border-color: #1F2937;
    --border-highlight: #374151;
    
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --purple-glow: #8B5CF6;
    --green-accent: #10B981;
    
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --container-max: 95%;
}

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

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Layout Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Common Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-secondary:hover {
    color: var(--text-primary);
}

/* Global Section Spacing */
.section-padding {
    padding: 3rem 0;
}

/* ========================================================
   GLOBAL BOOKMARK MODAL
   ======================================================== */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0.75rem;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    word-break: break-word;
}

.modal-textarea {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
    margin-bottom: 1rem;
}

.modal-textarea:focus {
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Utilities */
.hidden { 
    display: none !important; 
}

/* Ultra-Small Screen Responsiveness Base */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .modal-card {
        padding: 1rem;
    }
}