:root {
    --bg-color: #ffffff;
    --text-color-primary: #2d3748;
    --text-color-secondary: #a0aec0;
    --text-color-subtle: #718096;
    --card-bg-color: #ffffff;
    --card-border-color: #f0f0f0;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --card-shadow-active: 0 1px 4px rgba(0, 0, 0, 0.05);
    --icon-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --icon-border-color: #e0e0e0;
    --loader-dot-color: #e2e8f0;
    --loader-dot-active-color: #a0aec0;
}

.dark-mode {
    --bg-color: #1a202c;
    --text-color-primary: #edf2f7;
    --text-color-secondary: #a0aec0;
    --text-color-subtle: #718096;
    --card-bg-color: #2d3748;
    --card-border-color: #4a5568;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    --card-shadow-active: 0 1px 4px rgba(0, 0, 0, 0.25);
    --icon-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --icon-border-color: #4a5568;
    --loader-dot-color: #2d3748;
    --loader-dot-active-color: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.no-scroll {
    overflow: hidden;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease-out;
}

.card-loader {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 44px;
    height: 44px;
}

.card-loader div {
    width: 18px;
    height: 18px;
    background-color: var(--loader-dot-color);
    border-radius: 4px;
    animation: card-loader-animation 1.4s infinite ease-in-out both;
}

.card-loader div:nth-child(1) { animation-delay: -0.30s; }
.card-loader div:nth-child(2) { animation-delay: -0.15s; }
.card-loader div:nth-child(4) { animation-delay: 0s; }
.card-loader div:nth-child(3) { animation-delay: 0.15s; }

@keyframes card-loader-animation {
    0%, 100% {
        background-color: var(--loader-dot-color);
        transform: scale(1);
    }
    40% {
        background-color: var(--loader-dot-active-color);
        transform: scale(1.1);
    }
}

.container {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.content-hidden {
    opacity: 0;
    transform: scale(0.98);
}

.content-visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header {
    width: 280px;
    margin: 0 auto 30px auto;
    text-align: left;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.header-text h1, .header-text p { margin: 0; }

header h1 {
    font-size: 2.2rem;
    color: var(--text-color-primary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
    font-weight: 500;
}

header p {
    font-size: 1rem;
    color: var(--text-color-secondary);
    line-height: 1.5;
    transition: color 0.3s ease;
    font-weight: 300;
}

.grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 295px; 
    margin: 0 auto;
}

.card {
    background: var(--card-bg-color);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--card-border-color);
    aspect-ratio: 1/1;
    width: 140px;
    text-decoration: none;
    color: inherit;
    position: relative;
    flex-shrink: 0; 
}

.card:active {
    transform: scale(0.95);
    box-shadow: var(--card-shadow-active);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: var(--icon-shadow);
    border: 1px solid var(--icon-border-color);
    position: absolute;
    top: 15px;
    left: 15px;
}

.telegram .card-icon { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.email .card-icon { background: rgba(155, 89, 182, 0.1); color: #9b59b6; }
.blog .card-icon { background: rgba(230, 126, 34, 0.1); color: #e67e22; }
.status .card-icon { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }

.card-title {
    position: absolute;
    top: 65px;
    left: 15px;
    font-size: 1rem;
    color: var(--text-color-primary);
    margin: 0;
    transition: color 0.3s ease;
    font-weight: 400;
}

.card-username {
    position: absolute;
    top: 85px;
    left: 15px;
    font-size: 0.8rem;
    color: var(--text-color-subtle);
    margin: 0;
    transition: color 0.3s ease;
    font-weight: 300;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-color-subtle);
    font-size: 0.8rem;
    transition: color 0.3s ease;
    font-weight: 300;
}

.theme-switcher {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    color: var(--text-color-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg-color);
    color: var(--text-color-primary);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border-color);
    width: 90%;
    max-width: 320px;
    text-align: center;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button.cancel {
    background: var(--card-border-color);
    color: var(--text-color-primary);
}

.modal-button.confirm {
    background: #3498db;
    color: #ffffff;
}

.modal-button:hover {
    opacity: 0.85;
}