:root[data-theme="light"] {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --border-color: #e8eaed;
    --btn-bg: #ffffff;
    --accent-blue: #1a73e8;
    --accent-green: #34a853;
    --icon-fill: #1a1a1a;
    --hover-bg: #f1f3f4;
    --img-filter: grayscale(100%);
}

:root[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #e8eaed;
    --text-secondary: #bdc1c6;
    --border-color: #3c4043;
    --btn-bg: #2d2e30;
    --accent-blue: #8ab4f8;
    --accent-green: #81c995;
    --icon-fill: #e8eaed;
    --hover-bg: #303134;
    --img-filter: grayscale(0%);
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 10px 15px 40px 15px; /* Минимално отстояние горе */
}

/* Бутон за тема */
.theme-toggle {
    position: fixed;
    top: 10px; right: 10px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--btn-bg);
    border: 1px solid var(--border-color);
    cursor: pointer; z-index: 1001;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Контейнер */
.container {
    width: 100%; max-width: 420px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
    height: fit-content;
    margin-top: 5px;
}

/* Профил */
.profile-pic {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--border-color);
    filter: var(--img-filter);
    transition: all 0.3s ease;
    cursor: pointer;
}
.profile-pic:hover { transform: scale(1.05); }

.name { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.profession { font-size: 14px; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 15px; }

/* За мен */
.about-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 25px;
    padding: 0 10px;
}

/* Линкове */
.links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; }
.link-item {
    display: flex; align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
    font-weight: 500;
}
.link-item:hover { background: var(--hover-bg); transform: translateX(5px); }
.icon { width: 20px; height: 20px; fill: var(--icon-fill); margin-right: 12px; }

/* Бутони */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; }
.action-btn {
    padding: 12px; border: none; border-radius: 12px;
    font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 13px;
}
.save-btn { background: var(--accent-green); }
.share-btn { background: var(--accent-blue); }
.icon-small { width: 16px; height: 16px; fill: white; margin-right: 8px; }

/* QR */
.qr-wrapper {
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}
.qr-text { font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; }
#qrcode canvas, #qrcode img { margin: 0 auto; border: 8px solid white; border-radius: 12px; }

.pulse { animation: pulseEffect 2s infinite; }
@keyframes pulseEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Zoom Overlay */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none; justify-content: center; align-items: center;
    z-index: 2000; cursor: zoom-out; backdrop-filter: blur(8px);
}
.overlay.active { display: flex; }
.overlay img { max-width: 90%; max-height: 80%; border-radius: 12px; }

/* Анимации */
.animate-hidden { opacity: 0; transform: translateY(20px); }
.reveal { animation: revealIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes revealIn { to { opacity: 1; transform: translateY(0); } }