:root {
    --bg-main: #09090b;
    --bg-card: #18181b;
    --bg-card-hover: #27272a;
    --border: #27272a;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --accent: #3b82f6;
    --radius: 16px;
    --font: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    line-height: 1.5;
}

.loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-overlay p { color: var(--text-secondary); font-size: 0.9rem; letter-spacing: 1px; }

.bg-noise {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at top right, #1e1b4b 0%, transparent 40%),
                      radial-gradient(circle at bottom left, #18181b 0%, transparent 40%);
    z-index: -1;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
    max-width: 600px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
    border-color: #3f3f46;
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.full-width { grid-column: span 2; }

.profile-card {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.avatar-wrapper { position: relative; flex-shrink: 0; }
.avatar-img {
    width: 70px; height: 70px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
}
.status-indicator {
    position: absolute; bottom: 2px; right: 2px;
    width: 14px; height: 14px;
    background: #22c55e;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}
.profile-info h1 {
    font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem;
}
.role { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }

.social-row { display: flex; gap: 0.6rem; }
.btn-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: #27272a; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none; transition: all 0.2s;
}
.btn-icon:hover { background: var(--text-primary); color: var(--bg-main); }
.telegram:hover { background: #229ED9; color: white; }

h2 {
    font-size: 0.95rem; color: var(--text-secondary); font-weight: 500;
    margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    background: #27272a; padding: 0.2rem 0.6rem;
    border-radius: 6px; font-size: 0.8rem; color: var(--text-primary);
}

.hobby-table { display: flex; flex-direction: column; gap: 0.5rem; }
.hobby-item {
    background: #27272a; padding: 0.5rem 0.75rem; border-radius: 8px;
    display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem;
    color: var(--text-primary); transition: background 0.2s;
}
.hobby-item i { color: var(--text-secondary); width: 16px; text-align: center; }
.hobby-item:hover { background: #3f3f46; }
.hobby-item:hover i { color: var(--accent); }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.project-mini {
    background: #09090b; padding: 1rem; border-radius: 12px;
    border: 1px solid var(--border); display: flex; flex-direction: column;
    justify-content: space-between;
}
.project-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.project-icon { color: var(--accent); }
.project-mini h3 { font-size: 0.95rem; font-weight: 600; }
.project-mini p {
    font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.8rem; line-height: 1.3;
}
.project-links a {
    font-size: 0.75rem; font-weight: 600; color: var(--accent);
    text-decoration: none; margin-right: 0.8rem;
}

.timer-card { cursor: pointer; user-select: none; }
.timer-card:active { transform: scale(0.98); }
.timer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.timer-header h2 { margin-bottom: 0; }
.copy-hint {
    font-size: 0.8rem; color: var(--text-secondary); background: rgba(255,255,255,0.05);
    padding: 4px 8px; border-radius: 6px; display: flex; align-items: center; gap: 0.4rem;
}
.copy-hint.success { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.timer-grid { display: flex; justify-content: center; align-items: baseline; gap: 0.2rem; }
.time-unit { display: flex; flex-direction: column; align-items: center; width: 2.8rem; }
.time-num { font-family: monospace; font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.time-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0.25rem; }
.time-separator { font-size: 1.4rem; color: var(--border); margin-top: -10px; }
#s { color: var(--accent); }

@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .profile-card { grid-column: span 1; }
    .project-grid { grid-template-columns: 1fr; }
}