/* ==========================================================================
   1. FONTS & VARIABLES
   ========================================================================== */
@font-face {
    font-family: 'NeueHaasGrotesk';
    src: url('fonts/NeueHaasDisplay-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'NeueHaasGrotesk';
    src: url('fonts/NeueHaasDisplay-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'NeueHaasGrotesk';
    src: url('fonts/NeueHaasDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'NeueHaasGrotesk';
    src: url('fonts/NeueHaasDisplay-Bold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

:root {
    --primary: #689ABB;
    --primary-dark: #023149;
    --bg-dark: #023149;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-gradient: linear-gradient(135deg, #023149 0%, #689ABB 100%);
    --linkedin-color: #0077b5;
}

/* ==========================================================================
   2. GLOBAL STYLES & BACKGROUND
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 40px 20px;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-1 {
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    top: -10%;
    right: -10%;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    background: var(--primary);
    bottom: -10%;
    left: -10%;
}

/* ==========================================================================
   3. APP CONTAINER & HERO
   ========================================================================== */
.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    gap: 20px; 
}

.hero-logo {
    display: block;
    height: 60px !important; 
    width: auto !important;  
    object-fit: contain;
    margin: 0 auto;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* ==========================================================================
   4. LAYOUT & CARDS
   ========================================================================== */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 900px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.preview-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.drop-zone {
    width: 100%;
    max-width: 600px; 
    aspect-ratio: 1024 / 535; 
    position: relative;
    cursor: pointer;
    border-radius: 16px; 
    overflow: hidden;
    background: #0d1117;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

canvas {
    width: 100% !important;
    height: auto !important; 
    display: block;
    position: relative;
    z-index: 5;
    border-radius: 16px; 
}

/* ==========================================================================
   5. UPLOAD PLACEHOLDER OVERLAY
   ========================================================================== */
.placeholder {
    position: absolute;
    top: 32%; 
    left: 83%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.2s ease;
    text-align: center;
    pointer-events: none;
    padding: 20px;
}

.drop-zone:hover .placeholder {
    transform: translate(-50%, -50%) scale(1.05);
}

.upload-icon {
    background: var(--primary);
    padding: 0.85rem;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(104, 154, 187, 0.4);
    pointer-events: auto;
}

.placeholder h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: #000000 !important;
    line-height: 1.2;
}

.placeholder p {
    color: rgba(0, 0, 0, 0.75) !important;
    font-size: 0.8rem;
}

/* ==========================================================================
   6. CONTROLS PANEL & FORM INPUTS
   ========================================================================== */
.controls-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group label {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Style Switcher below Badge */
.badge-style-selector {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.badge-style-selector label {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.style-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.style-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.style-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.style-btn.active {
    background: rgba(104, 154, 187, 0.15);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(104, 154, 187, 0.25);
}

.style-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.style-text strong {
    font-size: 0.85rem;
    font-weight: 600;
}

.style-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.style-btn.active .style-text span {
    color: rgba(255, 255, 255, 0.8);
}

.text-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.text-field:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(104, 154, 187, 0.15);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider-container span {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 40px;
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    background: transparent;
    height: 20px;
}

input[type="range"]:disabled {
    opacity: 0.3;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -5px;
    border: 2px solid #0a0c10;
    transition: transform 0.1s ease;
}

/* ==========================================================================
   7. BUTTONS & UI ACTIONS
   ========================================================================== */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 49, 73, 0.3);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(104, 154, 187, 0.4);
}

.share-group {
    display: flex;
    gap: 12px;
}

.share-group .btn {
    flex: 1;
}

.btn-linkedin {
    background: var(--linkedin-color);
    color: #ffffff;
}

.btn-linkedin:not(:disabled):hover {
    background: #005e94;
}

.btn-email {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid var(--glass-border);
}

.btn-email:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   8. PREMIUM MODAL NOTIFICATION DIALOG SYSTEM
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(5, 6, 8, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.25rem;
}

.alert-icon-wrapper {
    background: rgba(104, 154, 187, 0.15);
    color: var(--primary);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(104, 154, 187, 0.2);
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}

.modal-body p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.modal-body strong {
    color: var(--primary);
    font-weight: 700;
}

/* ==========================================================================
   9. FOOTER METRICS
   ========================================================================== */
.legal-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ==========================================================================
   10. HUB ADDITIONS
   ========================================================================== */
.preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #f5c518;
    color: #023149;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
}

/* Upload prompt sized to the logo box from the admin editor */
.placeholder,
.drop-zone:hover .placeholder {
    width: auto;
    height: auto;
    padding: 0;
    transform: translate(-50%, -50%);
    border: none;
    background: none;
    overflow: hidden;
}
.placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 150px;
    transform-origin: center;
    transition: transform 0.2s ease;
}
.placeholder-inner .upload-icon { padding: 0.6rem; }
.placeholder-inner .upload-icon svg { width: 32px; height: 32px; }
