/* ============================================
   LightScreen Pro — СТИЛИ ДЛЯ СЕЛФИ
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ---------- КОНТЕЙНЕР ЭКРАНА ---------- */
.screen-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.light-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: background-color 0.05s linear;
}

/* ---------- РАМКА ДЛЯ КАДРА ---------- */
.camera-frame {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s;
}

.camera-frame.hide {
    opacity: 0;
}

/* ---------- ФИКСИРОВАННЫЕ КНОПКИ ВВЕРХУ ---------- */
.fixed-back-btn {
    position: fixed !important;
    top: 16px;
    left: 16px;
    z-index: 100;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white !important;
    text-decoration: none;
}

.fixed-back-btn:hover {
    background: rgba(50, 50, 60, 0.95);
    transform: scale(1.02);
}

.fixed-fullscreen-btn {
    position: fixed !important;
    top: 16px;
    right: 16px;
    z-index: 100;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
}

.fixed-fullscreen-btn:hover {
    background: rgba(50, 50, 60, 0.95);
    transform: scale(1.02);
}

/* ---------- ПАНЕЛЬ УПРАВЛЕНИЯ ---------- */
.ui-panel {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 10px 14px;
    z-index: 10;
    transition: transform 0.3s, opacity 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 280px;
    max-width: 95vw;
    text-align: center;
}

.ui-panel.hide {
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.ui-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
    cursor: grab;
    user-select: none;
}

.ui-row:active {
    cursor: grabbing;
}

.ui-row:last-child {
    margin-bottom: 0;
}

.ui-row::-webkit-scrollbar {
    height: 3px;
}

.ui-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ui-row::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 204, 0.5);
    border-radius: 3px;
}

/* ---------- ОБЩИЕ СТИЛИ КНОПОК ---------- */
.btn {
    background: rgba(40, 40, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn:hover,
.btn:active {
    background: rgba(60, 60, 75, 0.95);
    transform: scale(0.96);
    color: white;
}

/* ---------- СЛАЙДЕР ЯРКОСТИ ---------- */
.slider-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 30, 40, 0.8);
    padding: 4px 12px;
    border-radius: 30px;
    flex-shrink: 0;
}

.slider-group label {
    color: #ff99cc;
    font-weight: bold;
    font-size: 12px;
}

input[type="range"] {
    width: 100px;
    height: 3px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff99cc;
    cursor: pointer;
    border: none;
    -webkit-appearance: none;
}

.value-display {
    background: rgba(30, 30, 40, 0.8);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    color: #ff99cc;
    min-width: 45px;
    text-align: center;
}

/* ---------- СЕЛЕКТОР ЭФФЕКТОВ ---------- */
select.effect-select {
    background: rgba(40, 40, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    padding: 6px 14px;
    padding-right: 32px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16px' height='16px'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
    flex-shrink: 0;
}

select.effect-select:hover {
    background: rgba(60, 60, 75, 0.95);
}

/* ---------- ТЕКУЩИЙ ЦВЕТ ---------- */
.current-color-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 30, 40, 0.8);
    padding: 4px 12px;
    border-radius: 30px;
    flex-shrink: 0;
    cursor: pointer;
    transition: 0.2s;
}

.current-color-info:hover {
    background: rgba(50, 50, 60, 0.9);
    transform: scale(1.02);
}

.current-color-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ff99cc;
}

.current-color-hex {
    font-size: 12px;
    font-weight: bold;
    color: #ff99cc;
    font-family: monospace;
}

.picker-icon {
    font-size: 16px;
    color: #ff99cc;
    opacity: 0.7;
    transition: 0.2s;
    background: rgba(255, 153, 204, 0.15);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.current-color-info:hover .picker-icon {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 153, 204, 0.3);
}

/* ---------- ПАЛИТРА ЦВЕТОВ ---------- */
.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 8px 0 12px 0;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
}

.color-palette:active {
    cursor: grabbing;
}

.color-palette::-webkit-scrollbar {
    height: 3px;
}

.color-palette::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.color-palette::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 204, 0.5);
    border-radius: 3px;
}

.palette-item {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.palette-item:hover {
    transform: scale(1.1);
    border-color: #ff99cc;
    box-shadow: 0 0 12px rgba(255, 153, 204, 0.5);
}

.palette-item.active {
    border-color: #ff99cc;
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(255, 153, 204, 0.6);
}

/* ---------- РЕКЛАМНЫЙ БЛОК ---------- */
.ad-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 5px 10px;
    text-align: center;
    font-size: 9px;
    color: #ccc;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-badge {
    background: #ff00cc;
    color: #000;
    padding: 2px 8px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 8px;
}

/* ---------- ТОСТ УВЕДОМЛЕНИЯ ---------- */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(12px);
    color: #ff99cc;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
    font-weight: 500;
}

/* ---------- ПОДСКАЗКА ---------- */
.hint {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(8px);
    font-size: 9px;
    padding: 3px 12px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 15;
    white-space: nowrap;
    pointer-events: none;
}

/* ---------- ЭФФЕКТЫ АНИМАЦИИ ---------- */
@keyframes pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}
.effect-pulse { animation: pulse 1s infinite ease-in-out; }

@keyframes candle {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.08); }
    75% { filter: brightness(0.94); }
}
.effect-candle { animation: candle 0.3s infinite; }

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
.effect-rainbow { animation: rainbow 3s linear infinite; }

/* ---------- АНИМАЦИЯ ФОТО ---------- */
@keyframes photoFlash {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
    100% { filter: brightness(1); }
}
.photo-flash {
    animation: photoFlash 0.3s ease;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 768px) {
    .btn { padding: 5px 10px; font-size: 11px; }
    .toast { white-space: normal; text-align: center; max-width: 80%; bottom: 90px; }
    .ui-panel { padding: 8px 12px; bottom: 70px; }
    .slider-group { padding: 3px 10px; }
    input[type="range"] { width: 80px; }
    .palette-item { width: 38px; height: 38px; }
    .picker-icon { width: 22px; height: 22px; font-size: 12px; }
    .camera-frame { width: 85%; height: 85%; border-radius: 20px; }
}

@media (max-width: 640px) {
    .hint {
        font-size: 7px;
        top: 6px;
    }
    
    .fixed-back-btn,
    .fixed-fullscreen-btn {
        top: 10px;
    }
    
    .fixed-back-btn {
        left: 10px;
    }
    
    .fixed-fullscreen-btn {
        right: 10px;
    }
    
    .palette-item {
        width: 34px;
        height: 34px;
    }
    
    .camera-frame {
        width: 90%;
        height: 65%;
        border-radius: 15px;
    }
}
/* ========== SEO КОНТЕНТ ========== */
.seo-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    z-index: 9;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    max-height: 40vh;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
    color: #ccc;
}

.seo-content.hide {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.seo-content h1 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #00ffff;
}

.seo-content h2 {
    font-size: 16px;
    margin: 12px 0 8px;
    color: #ff99cc;
}

.seo-content h3 {
    font-size: 14px;
    margin: 10px 0 6px;
    color: #ffcc66;
}

.seo-content p {
    margin-bottom: 10px;
    color: #aaa;
}

.seo-content ul, .seo-content ol {
    margin: 8px 0 8px 20px;
}

.seo-content li {
    margin-bottom: 5px;
    color: #aaa;
}

.seo-content a {
    color: #00ffff;
    text-decoration: none;
}

.seo-content a:hover {
    text-decoration: underline;
}

.seo-content strong {
    color: #fff;
}

/* Скрытие при скрытой панели */
.ui-panel.hide ~ .seo-content {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Адаптив */
@media (max-width: 768px) {
    .seo-content {
        padding: 12px 16px;
        font-size: 11px;
        max-height: 35vh;
    }
    .seo-content h1 {
        font-size: 16px;
    }
    .seo-content h2 {
        font-size: 14px;
    }
}
/* ============================================
   ВСПЛЫВАЮЩЕЕ ОКНО С SEO КОНТЕНТОМ
   ============================================ */
.seo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.seo-modal.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.seo-modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.seo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.seo-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #00ffff, #ff99cc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.seo-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.seo-modal-close:hover {
    background: rgba(255, 80, 80, 0.6);
    transform: scale(1.05);
}

.seo-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
}

.seo-modal-body h1 {
    font-size: 22px;
    color: #00ffff;
    margin: 0 0 16px 0;
}

.seo-modal-body h2 {
    font-size: 18px;
    color: #ff99cc;
    margin: 20px 0 12px 0;
}

.seo-modal-body h3 {
    font-size: 16px;
    color: #ffcc66;
    margin: 16px 0 10px 0;
}

.seo-modal-body p {
    margin-bottom: 12px;
    color: #ccc;
}

.seo-modal-body ul, .seo-modal-body ol {
    margin: 10px 0 10px 20px;
}

.seo-modal-body li {
    margin-bottom: 6px;
    color: #bbb;
}

.seo-modal-body strong {
    color: #fff;
}

.seo-modal-body a {
    color: #00ffff;
    text-decoration: none;
}

.seo-modal-body a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .seo-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    .seo-modal-header {
        padding: 16px 20px;
    }
    .seo-modal-header h2 {
        font-size: 16px;
    }
    .seo-modal-body {
        padding: 16px;
        font-size: 12px;
    }
    .seo-modal-body h1 {
        font-size: 18px;
    }
    .seo-modal-body h2 {
        font-size: 16px;
    }
    .seo-modal-body h3 {
        font-size: 14px;
    }
}