/* Modern Theme Variables */
:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    --accent-color: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* App-like feel */
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1rem;
}

/* Header */
.app-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: var(--glass-border);
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.logo-area img {
    height: 32px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    display: flex;
    position: relative;
    background: #020617;
    /* Darker canvas bg */
}

/* Editor Container */
#tui-image-editor-container {
    flex: 1;
    height: 100% !important;
}

/* Buttons */
.btn {
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: #4f46e5;
}

.btn-icon {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

/* Accordion / Content Sections (Hidden by default in Pro mode, visible on scroll/toggle if needed) */
.content-section {
    display: none;
    /* Keeping it cleaner for the webapp feel */
}

/* AdSense Banner Container */
.ad-container {
    width: 100%;
    background: #020617;
    /* match darker canvas style or header style */
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: var(--glass-border);
    min-height: 90px;
    z-index: 100;
}

/* Elite Polish: Custom Webkit Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #020617;
    /* Matches app background */
}

::-webkit-scrollbar-thumb {
    background: #334155;
    /* Subtle dark slate */
    border-radius: 6px;
    border: 2px solid #020617;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Elite Polish: Button Micro-animations */
@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.btn-primary {
    animation: softPulse 2.5s infinite;
    position: relative;
    overflow: hidden;
}

/* Add a shiny hover sweep effect to primary buttons */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.btn-primary:hover::after {
    left: 150%;
}

/* Header Home Link */
.home-link {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.home-link:hover {
    color: var(--text-main);
}

/* App Footer */
.app-footer {
    background: #020617;
    border-top: var(--glass-border);
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    z-index: 100;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    margin: 0 5px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    font-size: 0.8rem;
    margin-top: 4px;
}

.footer-copyright a.text-white {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.footer-copyright a.text-white:hover {
    text-decoration: underline;
}