/* =====================================================
   CARDGIFT - GENERATOR PAGE STYLES
   Стили для страницы генератора открыток
   ===================================================== */

/* ===== БАЗОВЫЕ СТИЛИ ===== */
body {
    background-color: #111;
    color: #FFF;
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* ===== TEXTAREA ГАРАНТИРОВАННАЯ ВИДИМОСТЬ ===== */
#text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#text .text-editor {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    visibility: visible !important;
}

#greetingText {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 120px !important;
    background-color: #333 !important;
    border: 2px solid #FFD700 !important;
    color: #FFF !important;
    padding: 15px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    resize: vertical !important;
    margin-bottom: 15px !important;
    box-sizing: border-box !important;
}

#greetingText:focus {
    border-color: #FFA500 !important;
    outline: none !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important;
}

#greetingText::placeholder {
    color: #888 !important;
}

/* ===== EMOJI PICKER ===== */
#emojiPicker {
    display: none;
    background: #222;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

#emojiPicker.show {
    display: block !important;
}

.emoji-categories {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.emoji-categories button {
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
}

.emoji-categories button.active {
    background: #FFD700;
    border-color: #FFD700;
}

.emoji-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-container span {
    font-size: 24px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    border-radius: 5px;
}

.emoji-container span:hover {
    background: rgba(255, 215, 0, 0.2);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 40px;
}

.logo {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.tagline {
    font-size: 16px;
    color: #CCC;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

/* ===== ЗАГРУЗКА МЕДИА ===== */
.media-upload {
    border: 2px dashed #FFD700;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.media-upload:hover {
    background-color: rgba(255, 215, 0, 0.05);
}

.media-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #FFD700;
}

.media-upload-text {
    color: #CCC;
}

.media-upload-subtext {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

#mediaPreview {
    display: none;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #000;
}

/* ===== ВЫБОР СТИЛЯ ===== */
.style-options {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.style-options::-webkit-scrollbar {
    display: none;
}

.style-option {
    flex: 0 0 120px;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-option:hover {
    border-color: #FFD700;
    background-color: rgba(255, 215, 0, 0.05);
}

.style-option.active {
    border-color: #FFD700;
    background-color: rgba(255, 215, 0, 0.1);
}

.style-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.style-name {
    font-weight: bold;
    color: #CCC;
}

/* ===== ФОНОВЫЕ СТИЛИ ДЛЯ КАРТОЧЕК ===== */
.style-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.style-background.style-classic {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.style-background.style-sunset {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.style-background.style-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.style-background.style-space {
    background: radial-gradient(ellipse at center, #0c0c0c 0%, #000000 70%);
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
}

.style-background.style-neon {
    background: linear-gradient(45deg, #FF006E, #8338EC, #3A86FF);
    background-size: 400% 400%;
    animation: neonGradient 3s ease infinite;
}

@keyframes neonGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ПЕРЕКЛЮЧАТЕЛИ И ТАЙМЕРЫ ===== */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-label {
    font-weight: bold;
    color: #CCC;
}

.timer-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.timer-label {
    width: 180px;
    color: #CCC;
}

.timer-field {
    width: 80px;
    background-color: #333;
    border: 1px solid #444;
    color: #FFF;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
}

.timer-suffix {
    margin-left: 10px;
    color: #888;
}

/* ===== КНОПКИ ===== */
.instruction-btn {
    background: linear-gradient(45deg, #1E88E5, #1565C0);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.instruction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

.create-btn {
    background: linear-gradient(45deg, #43A047, #2E7D32);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 160, 71, 0.3);
}

.create-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.create-btn.loading {
    position: relative;
    color: transparent;
}

.create-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== ШАБЛОНЫ ===== */
.template-options {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.template-options::-webkit-scrollbar {
    display: none;
}

.template-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    color: #CCC;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.template-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
    color: #FFD700;
}

/* ===== ТЕКСТОВЫЙ РЕДАКТОР ===== */
.text-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.emoji-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.emoji-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.text-position {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 8px;
}

.position-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #FFD700;
    color: #FFD700;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.position-btn.active {
    background: rgba(255, 215, 0, 0.4);
    border: 2px solid #FFD700;
    color: #FFF;
}

/* ===== ЭМОДЗИ ПИКЕР ===== */
.emoji-picker {
    display: none;
    background: #1a1a1a;
    border: 1px solid #FFD700;
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    max-height: 200px;
}

.emoji-categories {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.emoji-categories::-webkit-scrollbar {
    display: none;
}

.emoji-categories button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.emoji-categories button:hover {
    opacity: 1;
    transform: scale(1.2);
}

.emoji-categories button.active {
    opacity: 1;
    border-bottom: 2px solid #FFD700;
}

.emoji-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.emoji-container::-webkit-scrollbar {
    display: none;
}

.emoji-container button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-container button:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* ===== СТИЛИ ТЕКСТА НА КАРТОЧКЕ ===== */
.card-greeting-new {
    color: #FFFFFF !important;
    text-shadow: 
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        3px 3px 0 #000,
        -4px 0 0 #000,
        4px 0 0 #000,
        0 -4px 0 #000,
        0 4px 0 #000,
        -2px -2px 4px rgba(0, 0, 0, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 12px rgba(0, 0, 0, 0.6) !important;
    font-weight: bold !important;
    font-size: 18px !important;
    white-space: pre-wrap !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    z-index: 10 !important;
    position: absolute !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.card-text, .card-title, .text-overlay {
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000;
    color: white !important;
}

.card-greeting {
    position: absolute;
    color: #FFFFFF !important;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.4;
    text-shadow: 2px 2px 4px #000000;
    z-index: 3;
}

/* ===== БЕГУЩАЯ СТРОКА ===== */
.marquee-container {
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    z-index: 15;
    overflow: hidden;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.marquee-text {
    animation: marquee 15s linear infinite;
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== ПРЕВЬЮ И РЕДАКТИРОВАНИЕ ===== */
.preview-container {
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
    position: relative;
}

.preview-edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.preview-edit-btn {
    flex: 1;
    background: linear-gradient(45deg, #1E88E5, #1565C0);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 0;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

.preview-edit-btn.edit {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
}

/* ===== ПРИВЕТСТВЕННЫЙ БАННЕР ===== */
.welcome-banner {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
    display: none;
}

.welcome-banner.show {
    display: block;
    animation: fadeInDown 0.6s ease;
}

.welcome-banner h3 {
    color: #FFD700;
    margin-bottom: 10px;
}

.welcome-banner p {
    color: #CCC;
    line-height: 1.5;
}

/* ===== АРХИВ ===== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.archive-item {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.archive-item-preview {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.archive-item-date {
    background-color: rgba(0, 0, 0, 0.7);
    color: #CCC;
    padding: 5px;
    font-size: 12px;
    text-align: center;
}

.archive-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 20px;
}

.archive-status-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: none;
}

.archive-status-info.show {
    display: block;
}

.archive-status-info h4 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 16px;
}

.archive-usage-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.archive-usage-fill {
    background: linear-gradient(45deg, #4CAF50, #2E7D32);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.archive-usage-text {
    color: #CCC;
    font-size: 12px;
    text-align: center;
    margin-top: 5px;
}

.archive-locked {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
}

.archive-locked h4 {
    color: #ff6666;
    margin-bottom: 10px;
}

.archive-locked p {
    color: #CCC;
    margin-bottom: 15px;
    font-size: 14px;
}

.activation-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.activation-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.archive-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.archive-btn {
    flex: 1;
    background: linear-gradient(45deg, #1E88E5, #1565C0);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.archive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

.archive-btn.save {
    background: linear-gradient(45deg, #4CAF50, #2E7D32);
}

.archive-btn.view {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

.archive-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== ИНСТРУКЦИИ ===== */
.instructions-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
}

.instructions-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    margin: 20px auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    color: #fff;
    border: 2px solid #ffd700;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: fit-content;
}

.instructions-header {
    text-align: center;
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
}

.instructions-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.instructions-body h3 {
    color: #ffd700;
    margin: 20px 0 15px 0;
    font-size: 18px;
}

.instruction-block {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 10px;
    border-left: 3px solid #ffd700;
}

.instruction-block strong {
    color: #ffd700;
    display: block;
    margin-bottom: 10px;
}

.instructions-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.instructions-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
    color: #e0e0e0;
}

.instructions-list li:before {
    content: "•";
    color: #ffd700;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.instruction-important {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
    color: #ffd700;
}

.close-instructions {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.close-instructions:hover {
    background: #ffed4e;
    transform: translateY(-1px);
}

/* ===== БЛОКИРОВКА КОНТЕНТА ===== */
.content-blocked-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.content-blocked-content {
    background: #222;
    border: 2px solid #ff4444;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    color: white;
}

.content-blocked-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.content-blocked-title {
    color: #ff6666;
    font-size: 20px;
    margin-bottom: 15px;
}

.content-blocked-message {
    color: #CCC;
    margin-bottom: 20px;
    line-height: 1.4;
}

.content-blocked-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ===== МОДАЛКА ШАРИНГА ===== */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-modal-content {
    background: #222;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: white;
    border: 2px solid #FFD700;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.share-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.share-method {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.share-method:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

.share-method h4 {
    color: #FFD700;
    margin-bottom: 10px;
    font-size: 18px;
}

.share-method p {
    color: #CCC;
    margin-bottom: 15px;
    line-height: 1.4;
}

.share-method-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-method-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.share-method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.share-method-btn.secondary {
    background: linear-gradient(45deg, #1E88E5, #1565C0);
    color: white;
}

.preview-image-container {
    text-align: center;
    margin-bottom: 20px;
}

/* ===== СОЦИАЛЬНЫЕ КНОПКИ ===== */
.social-platforms {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.social-platform-btn {
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-height: 60px;
    justify-content: center;
}

.social-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-platform-btn.whatsapp { background: #25D366; }
.social-platform-btn.telegram { background: #2CA5E0; }
.social-platform-btn.facebook { background: #4267B2; }
.social-platform-btn.instagram { background: #E4405F; }
.social-platform-btn.x { background: #000000; }
.social-platform-btn.viber { background: #665CAC; }
.social-platform-btn.tiktok { background: #FF0050; }
.social-platform-btn.email { background: #34495E; }

/* ===== ВИДЕО ===== */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

.video-error {
    background: rgba(255, 68, 68, 0.8);
    color: white;
}

.video-loading {
    background: rgba(255, 215, 0, 0.8);
    color: #000;
}

/* ===== КОШЕЛЕК ===== */
.wallet-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.id-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    border-radius: 30px;
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
    flex: 1;
    justify-content: center;
}

.id-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.id-label {
    margin-right: 5px;
}

.copy-icon {
    margin-left: 5px;
    font-size: 0.8em;
}

.connect-wallet-btn {
    background: linear-gradient(45deg, #1E88E5, #1565C0);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    width: 100%;
}

.connect-wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

#renderCanvas {
    display: none;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .logo {
        font-size: 28px;
    }

    .preview-container {
        height: 400px;
    }

    .instructions-content {
        margin: 10px auto;
        padding: 20px;
        width: 95%;
    }

    .instructions-header {
        font-size: 20px;
    }

    .share-modal-content {
        padding: 20px;
        margin: 10px;
    }

    .share-methods {
        gap: 15px;
    }

    .social-platforms {
        grid-template-columns: repeat(4, 1fr);
    }

    .archive-action-buttons {
        flex-direction: column;
    }
}

/* ===== TEMPLATES MODALS (Архив спонсора / Корпоративные) ===== */
.templates-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.templates-modal.show {
    display: flex !important;
}

.templates-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.templates-modal .modal-content {
    position: relative;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid #FFD700;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.templates-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.templates-modal .modal-header h2 {
    color: #FFD700;
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.templates-modal .modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.templates-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFD700;
    transform: rotate(90deg);
}

.templates-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.template-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.template-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #0d1b2a 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 48px;
}

.template-card-info {
    padding: 12px;
}

.template-card-title {
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-card-meta {
    color: #888;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 12px;
    color: #666;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .templates-modal .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .template-card-image {
        height: 120px;
    }
}
