:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    
    --primary-color: #58a6ff;
    --primary-glow: rgba(88, 166, 255, 0.4);
    --primary-gradient: linear-gradient(135deg, #58a6ff 0%, #316dca 100%);
    
    --success-color: #3fb950;
    --success-bg: rgba(63, 185, 80, 0.1);
    
    --danger-color: #f85149;
    --danger-bg: rgba(248, 81, 73, 0.1);
    
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 20px;
}

/* Stunning Animated Background */
.bg-mesh {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #58a6ff, transparent 70%);
    top: -100px; left: -200px;
}

.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #8957e5, transparent 70%);
    bottom: -100px; right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #3fb950, transparent 70%);
    top: 40%; left: 40%;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Typography & Headers */
header {
    width: 100%;
    padding: 50px 20px 30px;
    text-align: center;
}

.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.visitor-badge {
    height: 28px;
    border-radius: 4px;
    transition: transform 0.3s;
}

.visitor-badge:hover {
    transform: scale(1.05);
}

/* Theme Toggle */
.theme-toggle-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Global Stats Banner */
.global-stats-banner {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    margin-bottom: 5px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Light Mode */
body.light-mode {
    --bg-dark: #f0f2f5;
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a2e;
    --text-secondary: #555;
}

body.light-mode .bg-mesh {
    opacity: 0.3;
}

body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode textarea {
    background: rgba(0, 0, 0, 0.03);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a2e;
}

body.light-mode .btn-outline {
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
}

body.light-mode footer p {
    color: #555;
}

body.light-mode .theme-toggle-btn {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.1);
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #8b949e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.gradient-text .thin-text {
    font-weight: 300;
    background: linear-gradient(135deg, #58a6ff 0%, #8957e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.limit-notice {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.8;
}

/* Layout */
.dashboard {
    width: 95%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 500px;
}

.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* Elegant Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 10px;
    border: 1px solid transparent;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--panel-border);
}

.btn-outline {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.2);
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 12px;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(88, 166, 255, 0.05);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: #fff;
}

.full-width { width: 100%; }

/* Text Areas */
.textarea-wrapper {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.textarea-wrapper.drag-over {
    border-style: dashed;
    border-color: var(--primary-color);
    background: rgba(88, 166, 255, 0.05);
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.3) inset;
}

.textarea-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
}

textarea::placeholder { color: rgba(255,255,255,0.2); }

textarea#output-textarea.active-color { color: var(--success-color); }
textarea#output-textarea.inactive-color { color: var(--danger-color); }

/* Stats & Pills */
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.stats-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--panel-border);
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

/* Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
    background: var(--panel-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.badge {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.success-tab.active .badge { background: var(--success-color); color: #000; }
.danger-tab.active .badge { background: var(--danger-color); color: #fff; }

/* Status Board at Bottom */
.status-board {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-text.success { color: var(--success-color); }
.status-text.error { color: var(--danger-color); }

.main-controls {
    display: flex;
    gap: 12px;
}

/* Utilities */
.hidden { display: none !important; }

/* Premium Marketplace Banner */
.marketplace-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #4a0e8f 0%, #8957e5 40%, #c084fc 70%, #e879a8 100%);
    border-radius: 14px;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(137, 87, 229, 0.3);
}

.marketplace-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.marketplace-icon {
    font-size: 2.5rem;
    min-width: 50px;
    text-align: center;
}

.marketplace-info {
    flex: 1;
}

.marketplace-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.marketplace-info p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}

.marketplace-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.m-badge {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.marketplace-details {
    font-size: 0.82rem !important;
    color: rgba(255,255,255,0.75) !important;
    margin-bottom: 0 !important;
}

.btn-marketplace {
    background: #fff;
    color: #4a0e8f;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-marketplace:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Floating Donate Button */
.donate-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(255, 65, 108, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.05rem;
}

.donate-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 65, 108, 0.6);
}

.donate-btn:active {
    transform: translateY(0) scale(0.95);
}

footer {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.visitor-counter {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.visitor-counter:hover {
    opacity: 1;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 16px;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover { color: white; }

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.donation-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.donation-options .btn {
    flex: 1;
    padding: 10px 5px;
    font-size: 0.9rem;
}

.donate-amt.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.custom-donation input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

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

/* Responsive */
@media (max-width: 900px) {
    .workspace { grid-template-columns: 1fr; height: auto; }
    .panel { height: 450px; }
    .gradient-text { font-size: 2.5rem; }
    .status-info { flex-direction: column; gap: 20px; text-align: center; }
    .marketplace-banner { flex-direction: column; text-align: center; }
    .share-bar { flex-wrap: wrap; }
    .history-section { width: 90%; }
}

/* Share Buttons */
.share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.share-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.share-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.share-wa {
    background: #25d366;
    color: #fff;
}

.share-tg {
    background: #0088cc;
    color: #fff;
}

.share-copy {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid var(--panel-border) !important;
}

.share-join {
    background: linear-gradient(135deg, #8957e5, #d255f0);
    color: #fff;
    font-weight: 800;
}

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

/* Quota Pill */
.quota-pill {
    border-color: rgba(137, 87, 229, 0.3);
}

/* History Section */
.history-section {
    width: 95%;
    max-width: 1200px;
    padding: 20px;
    margin-top: 20px;
    z-index: 1;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 15px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 8px;
    border: 1px solid var(--panel-border);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--primary-color);
    background: rgba(88, 166, 255, 0.05);
}

.history-item-info {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
}

.history-item-info span {
    color: var(--text-secondary);
}

.history-item-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Premium CTA Modal */
.premium-modal-content {
    text-align: center;
    position: relative;
}

.premium-cta-body {
    padding: 10px 0;
}

.premium-cta-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.premium-cta-body h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-cta-body > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.premium-cta-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.cta-feature {
    font-size: 0.9rem;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    color: var(--text-primary);
}

.premium-reset-note {
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
}

/* Footer */
.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.footer-link:hover {
    opacity: 0.8;
}

/* About Page */
.about-page {
    width: 95%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
    margin-bottom: 20px;
}

.about-card {
    padding: 25px 30px;
}

.about-card h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.step-item {
    text-align: center;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 10px;
    color: white;
}

.step-item h3 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1rem;
}

.step-item p {
    font-size: 0.85rem;
}

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

.feature-item {
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--panel-border);
}

.faq-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--panel-border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 6px;
}

.faq-item p {
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .steps-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .global-stats-banner { flex-wrap: wrap; gap: 15px; }
}

/* Blog Styles */
.blog-tag {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-date {
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
    margin-bottom: 15px !important;
}

.about-card h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-top: 18px;
    margin-bottom: 6px;
}

.about-card code {
    background: rgba(137,87,229,0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}
