/* style.css */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0066cc;
    --primary-dark: #004499;
    --secondary: #3399ff;
    --accent: #66aaff;
    --light: #e6f2ff;
    --dark: #003366;
    --text: #ffffff;
    --glass: rgba(0, 68, 153, 0.8);
    --glass-border: rgba(102, 170, 255, 0.4);
}

body {
    background: linear-gradient(135deg, #001933, #003366, #004499, #0066cc);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Стили для заголовка */
header {
    background: var(--glass);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 10px rgba(51, 153, 255, 0.5));
}

.logo-text h1 {
    color: var(--text);
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logo-text p {
    color: var(--accent);
    font-size: 0.9rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: all 0.3s;
    padding: 8px 15px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.main-nav a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.main-nav a:hover:before {
    left: 100%;
}

.main-nav a:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Герой-секция */
.hero {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--text);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.6);
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary-dark);
    transition: all 0.3s;
    z-index: -1;
}

.btn-primary:hover:before {
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.8);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background: rgba(51, 153, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-devices {
    position: relative;
    width: 400px;
    height: 400px;
}

.device {
    position: absolute;
    font-size: 5rem;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.device.phone {
    top: 20px;
    left: 0;
    animation-delay: 0s;
}

.device.tablet {
    top: 100px;
    right: 0;
    animation-delay: 2s;
}

.device.laptop {
    bottom: 20px;
    left: 100px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Секция приложений */
.apps-section {
    padding: 80px 0;
    background: rgba(0, 51, 102, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 50px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.app-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.app-card:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.app-card:hover:before {
    left: 50%;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.app-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.app-card h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 15px;
}

.app-card p {
    color: var(--accent);
    margin-bottom: 20px;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.platform-tag {
    background: rgba(51, 153, 255, 0.2);
    color: var(--secondary);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(51, 153, 255, 0.4);
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.download-btn {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(51, 153, 255, 0.2);
    color: var(--secondary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid rgba(51, 153, 255, 0.4);
    cursor: pointer;
}

.download-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

/* Секция сообщества */
.community-section {
    padding: 80px 0;
    background: rgba(0, 34, 68, 0.5);
    backdrop-filter: blur(10px);
}

.sync-notification {
    background: rgba(51, 153, 255, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 10px;
    padding: 10px 15px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent);
    max-width: 500px;
    text-align: center;
}

.sync-notification i {
    color: var(--secondary);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.community-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.community-info {
    flex: 1;
}

.community-info h3 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
}

.community-info p {
    color: var(--accent);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(10px);
    color: var(--secondary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--secondary);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.message-board {
    flex: 1;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.message-board h3 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.message-form {
    margin-bottom: 30px;
}

#message-input {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 15px;
    transition: border-color 0.3s;
    background: rgba(0, 34, 68, 0.5);
    backdrop-filter: blur(5px);
    color: var(--text);
}

#message-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(51, 153, 255, 0.5);
}

#message-input::placeholder {
    color: var(--accent);
}

#post-message {
    width: 100%;
}

#post-message i {
    margin-right: 8px;
}

.messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.message {
    background: rgba(0, 34, 68, 0.5);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease;
}

.message:last-child {
    margin-bottom: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--accent);
}

.message-content {
    color: var(--text);
    line-height: 1.4;
    word-wrap: break-word;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Секция книги */
.book-section {
    padding: 80px 0;
    background: rgba(0, 51, 102, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.book-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.book-cover {
    flex: 1;
}

.book-image {
    font-size: 8rem;
    text-align: center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.book-info {
    flex: 2;
}

.book-info h3 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
}

.book-info p {
    color: var(--accent);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Секция официального сайта */
.official-site-section {
    padding: 80px 0;
    background: rgba(0, 34, 68, 0.5);
    backdrop-filter: blur(10px);
}

.site-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.site-info {
    flex: 1;
}

.site-info h3 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 20px;
}

.site-info p {
    color: var(--accent);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.site-preview {
    flex: 1;
}

.browser-window {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.browser-header {
    background: rgba(0, 51, 102, 0.7);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.browser-buttons {
    display: flex;
    gap: 8px;
}

.browser-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-btn.red {
    background: #ff5f57;
}

.browser-btn.yellow {
    background: #ffbd2e;
}

.browser-btn.green {
    background: #28ca42;
}

.browser-url {
    flex: 1;
    background: rgba(0, 34, 68, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: var(--accent);
    text-align: center;
    backdrop-filter: blur(5px);
}

.browser-content {
    background: linear-gradient(135deg, #001933, #003366);
    padding: 30px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-preview-content h4 {
    color: var(--text);
    margin-bottom: 10px;
}

.site-preview-content p {
    color: var(--accent);
}

/* Футер */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo h3 {
    margin-bottom: 10px;
    color: var(--light);
}

.footer-logo p {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--light);
}

/* Улучшенные стили для iOS кнопок и модального окна */
.ios-btn {
    cursor: pointer;
    border: none;
    font-family: inherit;
    width: auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ios-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ios-btn:active {
    transform: translateY(0);
}

/* Анимация пульсации для iOS кнопок */
.ios-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.ios-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--glass);
    backdrop-filter: blur(15px);
    margin: 5% auto;
    padding: 30px;
    border-radius: 25px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: var(--text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

.ios-instructions {
    margin-top: 20px;
}

.ios-instructions ol {
    margin: 15px 0;
    padding-left: 20px;
}

.ios-instructions li {
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.5;
}

.ios-download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.ios-download-links a {
    text-align: center;
    transition: all 0.3s;
}

.ios-download-links a:hover {
    transform: translateY(-2px);
}

.ios-note {
    background: rgba(0, 34, 68, 0.5);
    padding: 15px;
    border-radius: 15px;
    border-left: 4px solid var(--secondary);
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--accent);
}

/* Иконки в кнопках скачивания */
.download-btn i {
    margin-right: 8px;
}

/* Гарантия, что кнопки кликабельны */
.download-btn, .ios-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
}

/* Анимация появления элементов */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для состояния загрузки и ошибок */
.loading {
    text-align: center;
    color: var(--accent);
    padding: 20px;
    font-style: italic;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { color: transparent; }
    40% { color: var(--accent); }
    60% { color: transparent; }
    80%, 100% { color: transparent; }
}

.message.error {
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff4444;
}

.message.error .message-content {
    color: #ff8888;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    background: #4CAF50;
}

.status-offline {
    background: #f44336;
}

/* Адаптивность */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .community-content {
        flex-direction: column;
    }
    
    .book-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .ios-download-links {
        flex-direction: column;
    }
    
    .ios-instructions ol {
        padding-left: 15px;
    }
}

/* Гарантия, что ничто не перекрывает кнопки */
.app-card {
    position: relative;
    z-index: 1;
}

.download-buttons {
    position: relative;
    z-index: 2;
}

/* Снег */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0.5px);
    box-shadow: 
        0 0 5px rgba(255, 255, 255, 0.5),
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 15px rgba(255, 255, 255, 0.1);
}

/* Анимация падения снежинок */
@keyframes snowfall {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* Адаптивность для снега */
@media (max-width: 768px) {
    .snowflake {
        width: 3px !important;
        height: 3px !important;
    }
    
    #snow-container {
        display: block;
    }
}

/* Гарантируем, что снег не мешает интерактивным элементам */
.app-card, .btn-primary, .btn-secondary, .download-btn, 
.message-board, .social-link, .main-nav a {
    position: relative;
    z-index: 9999;
}

/* Гарантируем, что модальные окна поверх снега */
.modal {
    z-index: 10000;
}