html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 60px !important;
}
.language-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}
.language-select option {
    background-color: #000000;
    color: #ffffff;
    padding: 0.5rem;
}

.language-select option:hover {
    opacity: 0.7;
}
.gradient-text {
    background: linear-gradient(90deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-island {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-island.show {
    opacity: 1;
    transform: translateY(0);
    transform: translateX(-50%);
}

.card-strict {
    transition: all 0.2s ease !important;
    border: 1px solid #333333;
}

.card-strict:hover {
    border-color: #ffffff !important;
}

.section-height {
    min-height: 100vh;
}

.sharp-corners {
    border-radius: 0;
}

.minimal-corners {
    border-radius: 2px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}

.animate-slide-up {
    opacity: 1;
    animation: slideUp 0.6s ease forwards;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.dashboard {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dashboard-header {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.metrics-section {
    align-items: center;
}

.metrics-list h1 {
    font-size: 36px;
    margin-bottom: 40px;
    font-weight: 700;
}

.metric-item {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.metric-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.metric-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.metric-description {
    color: #888;
    font-size: 16px;
    line-height: 1.5;
}

.chart-container {
    background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
    border-radius: 8px;
    padding: 30px;
    height: 400px;
    position: relative;
    overflow: hidden;
    padding-bottom: 50px;
}

.chart-title {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 1px;
}

#performanceChart {
    opacity: 0;
    transition: opacity 1s ease;
}

#performanceChart.visible {
    opacity: 1;
}

/* Анимация для линий графика */
.chart-line-animation {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .metrics-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .metric-value {
        font-size: 36px;
    }
    
    .chart-container {
        height: 300px;
    }
    .dashboard, .chart-container {
        padding: 5px !important;
    }
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}
.htmx-request.htmx-indicator {
    display: inline;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}
/* Ensure card-strict elements are hidden initially */
.card-strict {
    opacity: 0;

}

/* Ensure glass-effect and sharp-corners are defined if not already in your CSS */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sharp-corners {
    border-radius: 0;
}

/* Gradient text style if not already defined */
.gradient-text {
    background: linear-gradient(90deg, #ffffff, #888888);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* Стили для PWA модального окна */
.pwa-install-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.pwa-install-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    width: 90%;
    text-align: center;
}

.pwa-install-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.pwa-install-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.pwa-install-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.4;
}

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

.pwa-install-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-install-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pwa-install-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.pwa-install-btn.secondary {
    background: #f5f5f5;
    color: #666;
}

.pwa-install-btn.secondary:hover {
    background: #e5e5e5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* iOS Safari специфичные стили */
@media screen and (max-width: 768px) {
    .pwa-install-content {
        width: 95%;
        padding: 25px;
    }
}

/* PWA Demo Modal Styles */
.pwa-demo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.pwa-demo-modal-content {
    position: relative;
    background-color: var(--dark-gray, #1a1a1a);
    border: 2px solid var(--light-gray, #404040);
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

.pwa-demo-modal-header {
    background-color: var(--medium-gray, #2a2a2a);
    border-bottom: 1px solid var(--light-gray, #404040);
    padding: 20px 30px;
    position: relative;
}

.pwa-demo-modal-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--accent-gray, #888888);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.pwa-demo-modal-close:hover {
    color: var(--accent-white, #ffffff);
}

.pwa-demo-modal-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: var(--accent-white, #ffffff);
}

.pwa-demo-modal-subtitle {
    font-size: 12px;
    color: var(--accent-gray, #888888);
    margin: 5px 0 0 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.pwa-demo-modal-body {
    padding: 30px;
    text-align: center;
}

.pwa-demo-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.pwa-demo-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--accent-gray, #888888);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.pwa-demo-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pwa-demo-btn {
    padding: 12px 24px;
    border: 2px solid var(--light-gray, #404040);
    background: var(--strict-black, #000000);
    color: var(--accent-white, #ffffff);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.pwa-demo-btn.primary {
    background: var(--accent-white, #ffffff);
    color: var(--strict-black, #000000);
    border-color: var(--accent-white, #ffffff);
}

.pwa-demo-btn.primary:hover {
    background: var(--accent-gray, #888888);
    border-color: var(--accent-gray, #888888);
}

.pwa-demo-btn.secondary:hover {
    background: var(--dark-gray, #1a1a1a);
    border-color: var(--accent-gray, #888888);
}

.pwa-demo-instructions {
    text-align: left;
    background: var(--strict-black, #000000);
    border: 1px solid var(--light-gray, #404040);
    padding: 20px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.8;
}

.pwa-demo-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.pwa-demo-instructions li {
    margin-bottom: 8px;
    color: var(--accent-gray, #888888);
}

.device-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-demo-modal-content {
        margin: 35% auto;
        width: 95%;
    }
    
    .pwa-demo-modal-header,
    .pwa-demo-modal-body {
        padding: 20px;
    }
    
    .pwa-demo-buttons {
        flex-direction: column;
    }
    
    .pwa-demo-btn {
        width: 100%;
    }
}

/* Language selector specific styles */
.language-selector-button {
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}
.language-dropdown {
    min-width: 140px;
}