/* ==========================================================================
   GEECOON AI | Model Lookbook Studio 
   Theme: Tech-wear / Modern Chic Dark Mode
   -------------------------------------------------------------------------- */

:root {
    /* Color Palette */
    --bg-primary: #09090b;
    --bg-secondary: #121214;
    --bg-glass: rgba(18, 18, 20, 0.65);
    --bg-glass-hover: rgba(28, 28, 32, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-neon: #ffffff;
    --accent-cyan: #00f0ff;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.2);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Transitions & Shadows */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.15);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow: hidden; /* App-like layout */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-highlight);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Layout Structure
   -------------------------------------------------------------------------- */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    height: 100vh;
    width: 100vw;
    transition: grid-template-columns 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-layout.sidebar-closed {
    grid-template-columns: 1fr 0px;
}

.main-workspace {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    overflow-y: auto;
    gap: 2.5rem;
    background: radial-gradient(circle at top left, #16161a 0%, var(--bg-primary) 100%);
}

.glassmorphism {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glass);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.logo strong {
    font-weight: 800;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-neon);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px var(--accent-cyan); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   Control Panel
   -------------------------------------------------------------------------- */
.control-panel {
    border-radius: 16px;
    padding: 2rem;
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-select, #prompt-input, #mention-text, #product-url {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

.modern-select:focus, #prompt-input:focus, #mention-text:focus, #product-url:focus {
    border-color: var(--border-highlight);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

#prompt-input {
    resize: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    padding: 0 2rem;
    height: 48px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    background: #e4e4e7;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Gallery Section & Masonry Grid
   -------------------------------------------------------------------------- */
.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-grow: 1;
}

.gallery-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-content: start;
    gap: 2rem;
}

/* --------------------------------------------------------------------------
   Image Tiles & Interactions
   -------------------------------------------------------------------------- */
.btn-select {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: var(--transition-smooth);
    z-index: 20;
}
.btn-select:hover {
    transform: scale(1.1);
    color: white;
    border-color: white;
}
.image-tile.selected .btn-select {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

.image-tile {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    height: max-content;
    cursor: zoom-in;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.image-tile img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    display: block;
}

.image-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--border-color);
}

.image-tile:hover img {
    transform: scale(1.08);
}

/* Selected State */
.image-tile.selected {
    border-color: var(--accent-neon);
    box-shadow: var(--shadow-glow);
    transform: scale(0.98);
}

.image-tile.selected img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.check-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.check-overlay i {
    background: var(--accent-neon);
    color: var(--bg-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transform: scale(0.5);
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.image-tile.selected .check-overlay {
    opacity: 1;
}

.image-tile.selected .check-overlay i {
    transform: scale(1);
}

.tile-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

/* --------------------------------------------------------------------------
   Skeleton Loader Shimmer Effect
   -------------------------------------------------------------------------- */
.skeleton-loader {
    background: var(--bg-secondary);
    pointer-events: none;
}

.skeleton-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite ease-in-out;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Publish Sidebar (Right Area)
   -------------------------------------------------------------------------- */
.publish-sidebar {
    border-left: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: opacity 0.3s ease, padding 0.4s ease, border 0.4s ease;
}

.app-layout.sidebar-closed .publish-sidebar {
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    border-left-color: transparent;
    pointer-events: none;
}

.sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.publish-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-grow: 1;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    color: var(--accent-neon);
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn:hover {
    color: var(--accent-neon);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: var(--accent-neon);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.2);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.4);
    color: white;
}

.selected-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.preview-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.preview-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.thumb-mini {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-highlight);
}

.thumb-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Social Actions
   -------------------------------------------------------------------------- */
.publish-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-primary);
}

.btn-threads {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.btn-threads:hover {
    background: #000000;
    border-color: var(--text-primary);
}

.btn-x {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.btn-x:hover {
    background: #000000;
    border-color: var(--text-primary);
}

.btn-ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    opacity: 0.9;
}

.btn-ig:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}

/* --------------------------------------------------------------------------
   Settings Tabs & Admin
   -------------------------------------------------------------------------- */
.settings-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}
.settings-tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}
.settings-tab-btn:hover:not(.active) {
    color: var(--text-primary);
}
.settings-tab-content {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}
.settings-tab-content.active {
    display: flex;
}
.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.admin-user-info {
    display: flex;
    flex-direction: column;
}
.admin-user-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}
.admin-user-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Modern Table (Products)
   -------------------------------------------------------------------------- */
.modern-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}
.modern-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}
.modern-table td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}
.badge-tag {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin: 2px;
}

/* --------------------------------------------------------------------------
   Pagination Controls
   -------------------------------------------------------------------------- */
.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}
.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-neon);
}
.page-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    font-weight: bold;
}
.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .app-layout {
        grid-template-columns: 1fr 340px;
    }
}

@media (max-width: 992px) {
    body {
        overflow-y: auto;
    }
    
    .app-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .publish-sidebar {
        position: fixed;
        inset: 0;
        z-index: 90000;
        background: var(--bg-primary);
        height: 100vh;
        border-top: none;
        border-left: none;
        transform: translateY(0);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }
    
    .app-layout.sidebar-closed .publish-sidebar {
        display: block;
        opacity: 0;
        pointer-events: none;
        transform: translateY(100%);
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-workspace {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .control-panel {
        padding: 1.25rem;
    }
    
    .publish-sidebar {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
        overflow: hidden;
    }
    
    .header-status {
        align-self: flex-start;
        margin-top: 0;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }
    .header-status::-webkit-scrollbar {
        display: none;
    }
    
    #admin-settings-modal > div {
        padding: 1.5rem;
        width: 95%;
    }
}
```