/* ==========================================================================
   Graphic Builder Stylesheet - Premium & High Fidelity
   ========================================================================== */

:root {
    --accent-color: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --bg-color: #060211;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --font-family: 'Outfit', 'Inter', sans-serif;
    
    /* Panel card variables */
    --card-bg: linear-gradient(145deg, #ffffff, #f1eefb);
    --card-header-bg: #e9e3ff;
    --card-header-text: #1e114d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0d0b14;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ==========================================================================
   1. Sidebar Controls (Left)
   ========================================================================== */

.sidebar {
    width: 380px;
    background-color: #12101b;
    border-right: 1px solid #231f33;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #231f33;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.brand-logo h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

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

.tagline {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.sidebar-sections {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.control-group {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #231f33;
}

.control-group h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-row {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-row.col-2 {
    flex-direction: row;
    gap: 12px;
}

.control-row.col-2 > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 11px;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

input[type="text"],
select,
textarea {
    background-color: #1a1726;
    border: 1px solid #2e2942;
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

textarea {
    resize: vertical;
}

/* Color Pickers */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 1px solid #2e2942;
    border-radius: 50%;
}

.color-val {
    font-size: 12px;
    font-family: monospace;
    color: #a1a1aa;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-transform: none;
    font-size: 13px;
    color: #ffffff;
}

.logo-sub-settings {
    background-color: #1a1726;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px dashed #2e2942;
}

.hidden {
    display: none !important;
}

/* Grid Upload list */
.grid-icons-setup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-upload-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.item-upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.item-upload-row span {
    color: #a1a1aa;
}

.item-upload-row input[type="file"] {
    max-width: 200px;
    font-size: 11px;
    color: #a1a1aa;
}

/* Export Button Section */
.action-group {
    border-bottom: 1px solid #231f33;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
    background-color: #b56bff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   2. Live Preview Panel (Right)
   ========================================================================== */

.preview-area {
    flex-grow: 1;
    background-color: #08060f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 40px;
}

/* Responsive Wrapper */
.canvas-scale-container {
    width: 1000px;
    height: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    flex-shrink: 0;
}

/* ==========================================================================
   3. The Target Graphic Canvas (1000px x 1000px)
   ========================================================================== */

.canvas-scale-container {
    width: var(--canvas-width, 1000px);
    height: var(--canvas-height, 1000px);
}

.graphic-canvas {
    width: var(--canvas-width, 1000px);
    height: var(--canvas-height, 1000px);
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 70px 60px;
    border-radius: 0px; /* Square graphic, perfect for high-res export */
    font-family: var(--font-family);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Ambient Ambient Glows */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.bg-glow-center {
    width: 450px;
    height: 450px;
    top: var(--center-node-y, 330px);
    left: calc((var(--canvas-width, 1000px) - 450px) / 2);
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-glow-left {
    width: 300px;
    height: 300px;
    top: 400px;
    left: 20px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 75%);
}

.bg-glow-right {
    width: 300px;
    height: 300px;
    top: 400px;
    right: 20px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 75%);
}

/* SVG Connecting Bridges */
.svg-bridges {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--canvas-width, 1000px);
    height: var(--canvas-height, 1000px);
    z-index: 2;
    pointer-events: none;
}

.bridge-line {
    stroke: var(--accent-color);
    stroke-width: 6px;
    opacity: 0.45;
    filter: drop-shadow(0 0 8px var(--accent-color));
}

/* 3.1 Header styling */
.header-container {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
    margin-bottom: 55px;
}

.top-badge {
    display: inline-block;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.03);
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}

.main-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}

.main-title span {
    display: block;
}

.accent-text-glow {
    color: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.15));
}

.tagline-row {
    font-size: 22px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 18px;
}

.tagline-highlight {
    color: var(--accent-color);
    font-weight: 700;
}

.description {
    font-size: 16px;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 620px;
    margin: 0 auto;
    font-weight: 400;
}

/* 3.2 Columns Matrix Section */
.columns-matrix {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 var(--card-spacing-x, 60px);
    margin-bottom: 60px;
}

.matrix-card {
    background: var(--card-bg);
    width: var(--card-width, 270px);
    height: var(--card-height, 300px);
    border-radius: 28px;
    padding: 30px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
                inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Connector overlay on card */
.matrix-card::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    z-index: -1;
}

.left-card::after {
    right: -40px;
    background: radial-gradient(circle at 100% 50%, var(--accent-color) 0%, transparent 60%);
    opacity: 0.3;
}

.right-card::after {
    left: -40px;
    background: radial-gradient(circle at 0% 50%, var(--accent-color) 0%, transparent 60%);
    opacity: 0.3;
}

.card-header-badge {
    background-color: var(--card-header-bg);
    color: var(--card-header-text);
    font-size: 15px;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    height: calc(100% - 50px);
}

/* Individual Icon block inside cards */
.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 16px;
    overflow: hidden;
    padding: 10px;
    width: 86px;
    height: 86px;
}

.icon-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-item svg {
    width: 100%;
    height: 100%;
}

/* Center Node Node */
.center-node-container {
    position: relative;
    width: var(--center-size, 240px);
    height: var(--center-size, 240px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.brand-circle-shadow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: var(--accent-color);
    opacity: 0.6;
    filter: blur(24px);
    z-index: 1;
}

.brand-circle {
    position: relative;
    width: 236px;
    height: 236px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 24px;
    border: 6px solid var(--accent-color);
}

.brand-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background-color: #0b0c15;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.brand-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

/* Default Logo styling inside brand circle */
.logo-svg-h {
    width: 100%;
    height: 100%;
}

.brand-name {
    color: #0c0d16;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.brand-badge-pill {
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 3.3 Bottom Trust Bar */
.features-bar {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 50px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-item:last-child {
    border-right: none;
}

.feat-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.feat-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

/* 3.4 Call-To-Action Pill Button */
.cta-banner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.cta-inner {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 12px 18px 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cta-sparkle {
    width: 44px;
    height: 44px;
    background-color: #f1edff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.cta-details {
    flex-grow: 1;
    padding: 0 20px;
}

.cta-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f0a28;
    margin-bottom: 2px;
}

.brand-text-accent {
    color: var(--accent-color);
    font-weight: 800;
}

.cta-subtitle {
    font-size: 13px;
    color: #5b5575;
    font-weight: 500;
}

.cta-arrow-btn {
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3);
}

.cta-arrow-btn svg {
    width: 20px;
    height: 20px;
}

/* Spin Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   4. 3-Card Symmetrical Layout for HubsKit
   ========================================================================== */

.bottom-card {
    display: none;
}

.graphic-canvas.layout-3-col {
    padding: 0;
}

.graphic-canvas.layout-3-col .header-container {
    position: absolute;
    top: 50px;
    left: 0;
    width: var(--canvas-width, 1000px);
    margin: 0;
}

.graphic-canvas.layout-3-col .columns-matrix {
    position: static;
    margin: 0;
}

.graphic-canvas.layout-3-col .left-card {
    position: absolute;
    top: 360px;
    left: var(--card-spacing-x, 60px);
    width: var(--card-width, 270px);
    height: var(--card-height, 300px);
}

.graphic-canvas.layout-3-col .right-card {
    position: absolute;
    top: 360px;
    right: var(--card-spacing-x, 60px);
    width: var(--card-width, 270px);
    height: var(--card-height, 300px);
}

.graphic-canvas.layout-3-col .center-node-container {
    position: absolute;
    top: var(--center-node-y, 330px);
    left: calc((var(--canvas-width, 1000px) - var(--center-size, 240px)) / 2);
    width: var(--center-size, 240px);
    height: var(--center-size, 240px);
}

.graphic-canvas.layout-3-col .bottom-card {
    display: flex;
    position: absolute;
    top: var(--bottom-card-y, 610px);
    left: calc((var(--canvas-width, 1000px) - var(--card-width, 270px)) / 2);
    z-index: 4;
    width: var(--card-width, 270px);
    height: var(--bottom-card-height, 230px);
    padding: 20px 24px;
}

.graphic-canvas.layout-3-col .bottom-card .card-header-badge {
    margin-bottom: 12px;
    font-size: 13px;
    padding: 5px 18px;
}

.graphic-canvas.layout-3-col .bottom-card .icon-item {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    padding: 6px;
}

.graphic-canvas.layout-3-col .bottom-card .icons-grid {
    gap: 12px;
    height: calc(100% - 40px);
}

.graphic-canvas.layout-3-col #bridge-bottom {
    display: block;
}

.graphic-canvas.layout-3-col .features-bar {
    position: absolute;
    top: var(--features-y, 865px);
    left: var(--card-spacing-x, 60px);
    width: calc(var(--canvas-width, 1000px) - (var(--card-spacing-x, 60px) * 2));
    margin: 0;
    padding: 10px 0;
}

.graphic-canvas.layout-3-col .cta-banner {
    position: absolute;
    top: var(--cta-y, 920px);
    left: calc((var(--canvas-width, 1000px) - var(--cta-width, 640px)) / 2);
    width: var(--cta-width, 640px);
    margin: 0;
}

.graphic-canvas.layout-3-col .cta-inner {
    padding: 8px 14px 8px 20px;
}

.letter-avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
}
