/* Modern Glassmorphic CSS with Theme Switcher support */
:root {
    /* To'q rang mavzusi o'zgaruvchilari (Dark theme) */
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(59, 130, 246, 0.15);
}

[data-theme="light"] {
    /* Yorug' rang mavzusi o'zgaruvchilari (Light theme) */
    --bg-color: #f1f5f9;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #059669;
    --danger-color: #dc2626;
    --card-shadow: rgba(15, 23, 42, 0.08);
    --glow-color: rgba(37, 99, 235, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Orqa fondagi chiroyli doiralar */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.circle-1 {
    width: 350px;
    height: 350px;
    background: #3b82f6;
    top: -100px;
    right: -100px;
    animation: move1 12s infinite alternate;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: #10b981;
    bottom: -150px;
    left: -150px;
    animation: move2 15s infinite alternate;
}

@keyframes move1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, 100px); }
}

@keyframes move2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(120px, -120px); }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    z-index: 1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo-emoji {
    font-size: 28px;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-theme {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.btn-theme:hover {
    transform: scale(1.05);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Glassmorphism Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 10px 40px var(--glow-color);
    transform: translateY(-4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
}

.card-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--glass-border);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--danger-color);
    font-size: 13px;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Profile Card */
.profile-card {
    align-items: center;
    text-align: center;
}

.avatar-container {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 4px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.avatar {
    width: 90px;
    height: 90px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.subtitle {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.bot-promo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    text-align: left;
}

.bot-icon {
    font-size: 28px;
}

.bot-details h3 {
    font-size: 14px;
    font-weight: 600;
}

.bot-details p {
    font-size: 12px;
    color: var(--text-muted);
}

/* To-Do Planner */
.todo-input-group {
    display: flex;
    gap: 10px;
}

.todo-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-color);
    outline: none;
    font-size: 14px;
}

.todo-input-group input:focus {
    border-color: var(--primary-color);
}

.btn-add {
    background: var(--primary-color);
    color: white;
    padding: 0 20px;
}

.todo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.todo-item.completed span {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.todo-text {
    flex: 1;
    margin-left: 12px;
    font-size: 14px;
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
}

.todo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Currency Converter */
.converter-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px 16px;
}

.input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    padding: 10px 0;
}

.currency-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.arrow-down {
    align-self: center;
    font-size: 18px;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Clicker Game */
.clicker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 10px 0;
}

.circle-clicker {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border: none;
    font-size: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.circle-clicker:active {
    transform: scale(0.9);
}

.score-board {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.score-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.clicker-footer {
    display: flex;
    justify-content: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

/* Global Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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