:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --background-color: #F7F7F7;
    --text-color: #2D3436;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    --primary-color: #FF8787;
    --secondary-color: #66F2E8;
    --background-color: #1A1A1A;
    --text-color: #E0E0E0;
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease; /* Плавный переход для фона и текста */
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    animation: float 10s infinite;
    will-change: transform; /* Предупреждение браузера о предстоящих изменениях */
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.circle:nth-child(2) {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(100px, 100px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    transition: background 0.3s ease; /* Плавный переход для фона */
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    margin: 0 1rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    position: relative;
}

.hero-content {
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: font-size 0.3s ease; /* Плавное изменение размера шрифта */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-custom {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem; /* Подкорректировано отступы */
    border-radius: 50px; /* Округлая кнопка */
    border: none;
    font-weight: 600; /* Жирный текст */
    text-transform: uppercase; /* Текст в верхнем регистре */
    letter-spacing: 1px; /* Пробелы между буквами */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Плавный переход для трансформации и тени */
}

.btn-custom:hover {
    transform: translateY(-5px); /* Подъем кнопки при наведении */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Тень при наведении */
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem 0;
    transition: transform 0.3s ease; /* Плавное перемещение */
}

.glass-card:hover {
    transform: translateY(-10px); /* Эффект при наведении */
}

.features {
    padding: 5rem 0;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease; /* Плавное изменение для кнопки */
}

.theme-toggle:hover {
    transform: scale(1.1); /* Легкое увеличение при наведении */
}

.theme-toggle i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.glass-caption {
    width: 60%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 0.6rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    text-align: center;
}

.glass-caption h5,
.glass-caption p {
    color: var(--text-color);
}

.clock-section {
    text-align: center;
}

.clock {
    position: relative;
    width: 250px;
    height: 250px;
    border: 8px solid #333;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.hand {
    position: absolute;
    background: #333;
    transform-origin: bottom;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.hour-hand {
    width: 6px;
    height: 50px;
    background: #FF6B6B;
    border-radius: 6px;
    z-index: 3;
}

.minute-hand {
    width: 4px;
    height: 70px;
    background: #4ECDC4;
    border-radius: 4px;
    z-index: 2;
}

.second-hand {
    width: 2px;
    height: 90px;
    background: #FF6B6B;
    border-radius: 2px;
    z-index: 1;
}

.center-circle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.numbers {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.number {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.digital-time {
    margin-top: 20px;
    font-size: 24px;
    color: #333;
}

.date {
    font-size: 20px;
    color: #333;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .btn-custom {
        padding: 0.8rem 1.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}
