/* ==========================================================================
   START / WELCOME PAGE STYLES (NEW PREMIUM DARK THEME)
   ========================================================================== */

   .start-view-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 60px;
    box-sizing: border-box;
    overflow-y: auto;
    background: var(--bg-body, #0d1115); /* Deep dark background */
}

.start-view-content {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --------------------------------------------------------------------------
   WIDGET: HEADER
   -------------------------------------------------------------------------- */
.welcome-header-widget {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: fadeInDown 0.5s ease-out;
}

.welcome-header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.2;
}

.welcome-header-text .gradient-text {
    background: linear-gradient(135deg, #F37B20, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* standard property */
}

.welcome-header-text p {
    font-size: 1rem;
    color: var(--text-muted);
}

.welcome-header-search {
    position: relative;
    width: 300px;
}

.welcome-header-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.welcome-header-search input:focus {
    border-color: rgba(243, 123, 32, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(243, 123, 32, 0.1);
}

.welcome-header-search .lightning-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #F37B20;
}

/* --------------------------------------------------------------------------
   TOP ROW (HERO + GRID)
   -------------------------------------------------------------------------- */
.welcome-top-row {
    display: flex;
    gap: 24px;
    width: 100%;
    margin-bottom: 10px;
}

/* WIDGET: HERO */
.welcome-hero-widget {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(30, 31, 32, 0.95) 0%, rgba(19, 19, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.welcome-hero-widget:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(40, 42, 45, 0.95) 0%, rgba(22, 23, 25, 0.95) 100%);
    border-color: rgba(243, 123, 32, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(243, 123, 32, 0.1);
}

.hero-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(243, 123, 32, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(243, 123, 32, 0.4);
    border: 1px solid rgba(243, 123, 32, 0.2);
}

.hero-icon-box .icon {
    font-size: 1.8rem;
    color: #F37B20;
    text-shadow: 0 0 10px rgba(243, 123, 32, 0.8);
}

.welcome-hero-widget h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-hero-widget p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 40px;
    max-width: 80%;
}

.hero-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #F37B20;
    letter-spacing: 0.5px;
}

.hero-action span:last-child {
    transition: transform 0.2s ease;
}

.welcome-hero-widget:hover .hero-action span:last-child {
    transform: translateX(4px);
}

/* WIDGET: TILES GRID */
.welcome-tiles-grid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 16px;
    padding-bottom: 8px; /* space for scrollbar */
    scroll-behavior: smooth;
    box-sizing: border-box;
    align-content: stretch;
}

.welcome-tiles-grid::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.welcome-tiles-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.welcome-small-tile {
    flex: 1 1 170px;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 31, 32, 0.95) 0%, rgba(19, 19, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.welcome-small-tile:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(40, 42, 45, 0.95) 0%, rgba(22, 23, 25, 0.95) 100%);
    border-color: rgba(243, 123, 32, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

body.light-theme .welcome-small-tile {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .welcome-small-tile:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
    border-color: rgba(243, 123, 32, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.tile-icon-small {
    width: 44px;
    height: 44px;
    background: rgba(243, 123, 32, 0.08); /* Transparent orange glow */
    border: 1px solid rgba(243, 123, 32, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #F37B20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 123, 32, 0.1);
}

.welcome-small-tile:hover .tile-icon-small {
    background: rgba(243, 123, 32, 0.15);
    border-color: rgba(243, 123, 32, 0.4);
    box-shadow: 0 8px 25px rgba(243, 123, 32, 0.25);
    transform: scale(1.1);
}

.tile-icon-small svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.tile-content h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

.tile-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 8px 0 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   WIDGET: BANNER
   -------------------------------------------------------------------------- */
.welcome-banner-widget {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 31, 32, 0.95) 0%, rgba(19, 19, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 35px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Abstract circles overlay simulating the screenshot's banner graphic */
.welcome-banner-widget::after {
    content: '';
    position: absolute;
    right: -10%;
    top: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle at center, rgba(243, 123, 32, 0.12) 0%, rgba(243, 123, 32, 0.05) 30%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.banner-badge {
    background: rgba(243, 123, 32, 0.15);
    color: #F37B20;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 60px;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    display: inline-block;
    border: 1px solid rgba(243, 123, 32, 0.2);
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(243, 123, 32, 0.1);
}

.welcome-banner-widget h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.welcome-banner-widget p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0 0 20px 0;
}

.banner-btn {
    background: white;
    color: black;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.banner-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

.banner-lightning {
    position: relative;
    z-index: 2;
    width: 70px;
    height: 70px;
    background: rgba(243, 123, 32, 0.1);
    border: 1px solid rgba(243, 123, 32, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #F37B20;
    box-shadow: 0 0 25px rgba(243, 123, 32, 0.2);
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(243, 123, 32, 0.15); transform: scale(1); }
    50% { box-shadow: 0 0 35px rgba(243, 123, 32, 0.4); transform: scale(1.05); }
}

/* --------------------------------------------------------------------------
   BOTTOM ROW (POLL + ACTIVITY)
   -------------------------------------------------------------------------- */
.welcome-bottom-row {
    display: flex;
    gap: 24px;
    margin-top: 10px;
}

/* WIDGET: POLL */
.welcome-poll-widget {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(30, 31, 32, 0.95) 0%, rgba(19, 19, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #F37B20; /* Premium Orange Accent */
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.poll-header, .activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.accent-bar {
    width: 4px;
    height: 16px;
    border-radius: 2px;
}

.pulse-accent { background: #F37B20; } /* Changed to Orange as per user request */
.blue-accent { background: #F37B20; }

.poll-header h3, .activity-header h3 {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

.welcome-poll-widget p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.poll-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(243, 123, 32, 0.3);
    padding-left: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.poll-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #F37B20;
    transition: width 0.2s ease;
}

.poll-btn:hover:not(:disabled)::before {
    width: 4px;
}

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

/* WIDGET: ACTIVITY */
.welcome-activity-widget {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(30, 31, 32, 0.95) 0%, rgba(19, 19, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #F37B20; /* Premium Orange Accent */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.activity-header {
    justify-content: flex-start;
    position: relative;
}

.view-all-link {
    position: absolute;
    right: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #F37B20;
    text-decoration: none;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 10px 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.activity-item:hover .activity-icon {
    background: rgba(243, 123, 32, 0.1);
    border-color: rgba(243, 123, 32, 0.3);
    color: #F37B20;
    transform: scale(1.05);
}

.activity-details h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.activity-details p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Builder Admin specific styles */
.welcome-builder-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.builder-sidebar {
    flex: 0 0 350px;
}

.builder-main {
    flex: 1;
}

.layout-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layout-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.layout-item.dragging {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.05);
}

.layout-item.drag-over {
    border-color: var(--primary-color);
    box-shadow: 0 -4px 0 var(--primary-color); /* Simplified drop indicator */
}

.layout-item .drag-handle {
    cursor: grab;
    padding: 0 15px 0 0;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.layout-item .item-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.layout-item .item-actions {
    display: flex;
    gap: 10px;
}

.widget-config-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.widget-types-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-type-btn {
    padding: 15px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.widget-type-btn:hover {
    background: var(--bg-surface-active);
}

/* Changelog popup button - Redesigned for WOW factor */
.view-changelog-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #F37B20 0%, #FF9E5E 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(243, 123, 32, 0.4);
    position: relative;
    overflow: hidden;
}

.view-changelog-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: 1;
}

.view-changelog-btn:hover::before {
    left: 100%;
}

.view-changelog-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(243, 123, 32, 0.5);
}

.view-changelog-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(243, 123, 32, 0.4);
}

.view-changelog-btn span.btn-emoji {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* Changelog modal body typography */
.changelog-body h1, .changelog-body h2, .changelog-body h3 {
    color: #F37B20;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 700;
}
.changelog-body p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}
.changelog-body ul, .changelog-body ol {
    padding-left: 24px;
    margin: 12px 0;
}
.changelog-body li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.changelog-body a {
    color: #F37B20;
    text-decoration: none;
    border-bottom: 1px dashed #F37B20;
    transition: all 0.2s ease;
}
.changelog-body a:hover {
    border-bottom-style: solid;
    padding-bottom: 1px;
}

/* Light Theme overrides for main widgets to match banner updates */
body.light-theme .welcome-hero-widget, 
body.light-theme .welcome-poll-widget, 
body.light-theme .welcome-activity-widget,
body.light-theme .welcome-tile-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e1e5ea 100%); /* Slightly deeper grey for shadow depth */
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.light-theme .welcome-hero-widget:hover,
body.light-theme .welcome-tile-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
    border-color: rgba(243, 123, 32, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}


/* Light Theme Banner Fix */
body.light-theme .welcome-banner-widget {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .welcome-banner-widget h2 {
    color: var(--text-primary);
}

body.light-theme .welcome-banner-widget p {
    color: var(--text-muted);
}

body.light-theme .banner-btn {
    background: var(--primary-color);
    color: white;
}

body.light-theme .banner-btn:hover {
    background: #d46a1b; /* Darker orange */
}

/* --------------------------------------------------------------------------
   CHANGELOG MODAL
   -------------------------------------------------------------------------- */
.changelog-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.3s ease;
}

.changelog-modal-container {
    background: #1e1f20;
    border-radius: 24px;
    max-width: 760px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(243, 123, 32, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #F37B20;
    animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.changelog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.changelog-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.changelog-close-x {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.changelog-close-x:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.changelog-modal-body, .admin-wysiwyg-editor {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.7;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    outline: none;
}

.admin-wysiwyg-editor {
    min-height: 250px;
    padding: 24px;
    background: #1e1f20; /* Match dark theme popup background */
    border-radius: 0 0 8px 8px;
}

.changelog-modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
}

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

/* Light Theme Overrides for Changelog Modal */
body.light-theme .changelog-modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}

body.light-theme .changelog-modal-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

body.light-theme .changelog-modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .changelog-modal-header h2 {
    color: var(--text-primary);
}

body.light-theme .changelog-close-x {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.light-theme .changelog-close-x:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .changelog-modal-body, 
body.light-theme .admin-wysiwyg-editor {
    color: var(--text-secondary);
    background: #ffffff;
}

body.light-theme .admin-wysiwyg-editor {
    background: #f8f9fa; /* Slightly off-white for editor contrast in light mode */
}

