:root { --bg: #050505; --surface: #0a0a0a; --border: #333; --text: #fff; --text-muted: #888; --accent: #ccff00; }
* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }
body { font-family: 'IBM Plex Mono', monospace; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.container { width: 100%; max-width: 800px; background: var(--surface); border: 1px solid var(--border); padding: 40px; }
.header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.header h1 { font-family: 'Space Grotesk', sans-serif; font-size: 2.5em; font-weight: 700; text-transform: uppercase; letter-spacing: -2px; color: var(--text); }
.header h1 span { color: var(--accent); }
.header .subtitle { font-size: 0.8em; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-top: 5px; }
.section { margin-bottom: 25px; }
.section-title { font-size: 0.8em; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px; }
.section-title::before { content: '> '; color: var(--accent); }
.file-upload-area { padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s; background: var(--bg); border: none; position: relative; }
.file-upload-area::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(90deg, var(--border) 50%, transparent 50%), linear-gradient(90deg, var(--border) 50%, transparent 50%), linear-gradient(0deg, var(--border) 50%, transparent 50%), linear-gradient(0deg, var(--border) 50%, transparent 50%); background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px; background-position: 0 0, 0 100%, 0 0, 100% 0; animation: borderMarch 0.8s linear infinite; }
.file-upload-area:hover::after { background-image: linear-gradient(90deg, var(--accent) 50%, transparent 50%), linear-gradient(90deg, var(--accent) 50%, transparent 50%), linear-gradient(0deg, var(--accent) 50%, transparent 50%), linear-gradient(0deg, var(--accent) 50%, transparent 50%); }
@keyframes borderMarch { from { background-position: 0 0, 0 100%, 0 0, 100% 0; } to { background-position: 12px 0, -12px 100%, 0 -12px, 100% 12px; } }
.file-upload-area .upload-icon { font-size: 24px; display: block; margin-bottom: 10px; }
.file-upload-area .upload-text { font-size: 0.9em; color: var(--text-muted); }
.file-upload-area .file-name { font-size: 0.8em; color: var(--accent); margin-top: 10px; word-break: break-all; }
input[type="file"] { display: none; }
.preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.preview-mini { border: 1px solid var(--border); padding: 15px; text-align: center; background: var(--bg); }
.preview-mini .mini-label { font-size: 0.7em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.preview-mini img { max-width: 100%; max-height: 80px; object-fit: contain; }
.preview-mini .no-preview { color: var(--border); font-size: 2em; }
.status-box { padding: 10px 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { flex: 1; padding: 15px; border: 1px solid var(--border); background: transparent; color: var(--text); font-family: 'IBM Plex Mono', monospace; font-size: 0.9em; font-weight: 500; text-transform: uppercase; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-generate { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-generate:hover:not(:disabled) { background: #aadd00; color: #000; }
.btn-download, .btn-preview { display: none; }
.btn-download.visible, .btn-preview.visible { display: flex; }
.generated-info { display: none; margin-top: 20px; padding: 15px; border: 1px solid var(--accent); color: var(--accent); font-size: 0.9em; text-align: center; text-transform: uppercase; }
.generated-info.visible { display: block; }
.preview-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; flex-direction: column; padding: 20px; }
.preview-modal-header { display: flex; justify-content: flex-end; margin-bottom: 15px; }
.preview-modal-close { background: var(--accent); color: #000; border: none; padding: 10px 20px; font-family: 'IBM Plex Mono', monospace; font-weight: bold; text-transform: uppercase; cursor: pointer; }
.preview-modal iframe { width: 100%; height: 100%; border: 1px solid var(--border); background: #000; }
.hidden { display: none !important; }

/* ===== СТИЛИ ДЛЯ ГАЙДА ===== */
.guide-trigger { margin-top: 40px; text-align: center; border-top: 1px solid var(--border); padding-top: 20px; }
.btn-guide { width: 100%; background: var(--bg); border-style: dashed; font-size: 1em; padding: 18px; }
.btn-guide:hover { border-style: solid; background: rgba(204, 255, 0, 0.05); }

/* Бронебойная анимация через max-height */
.guide-section { 
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}
.guide-section.active { 
    max-height: 3000px; /* Достаточно для всего контента */
    opacity: 1;
    margin-top: 20px;
}

.guide-inner { 
    background: var(--bg); 
    border: 1px solid var(--border); 
    padding: 30px; 
}

.guide-header h2 { font-family: 'Space Grotesk', sans-serif; color: var(--accent); margin-bottom: 10px; font-size: 1.5em; text-transform: uppercase; letter-spacing: -1px; }
.guide-header p { font-size: 0.9em; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.guide-header b { color: var(--text); }
.guide-alert { padding: 15px; background: rgba(255, 153, 0, 0.1); border-left: 4px solid #ff9800; color: #ff9800; font-size: 0.85em; margin-bottom: 30px; line-height: 1.5; }
.guide-section h3 { color: var(--text); margin-top: 30px; margin-bottom: 15px; font-size: 1.1em; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

/* Сетка ссылок */
.links-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 30px; }
.link-item { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--border); padding: 10px 15px; font-size: 0.85em; transition: border-color 0.2s; gap: 10px; }
.link-item:hover { border-color: #555; }
.link-item a { color: var(--accent); font-family: monospace; font-size: 1em; word-break: break-all; text-decoration: none; }
.link-item a:hover { text-decoration: underline; }
.link-item span { color: var(--text-muted); text-align: right; font-size: 0.9em; flex-shrink: 0; margin-left: auto; }
.copy-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; padding: 4px 8px; font-size: 1em; transition: all 0.2s; flex-shrink: 0; border-radius: 0; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn:active { transform: scale(0.9); }

/* Шаги */
.guide-steps { display: flex; flex-direction: column; gap: 25px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num { font-family: 'Space Grotesk', sans-serif; font-size: 1.5em; font-weight: 700; color: var(--accent); opacity: 0.5; line-height: 1; margin-top: -2px; }
.step-text strong { display: block; color: var(--text); margin-bottom: 8px; font-size: 1em; text-transform: uppercase; letter-spacing: 0.5px; }
.step-text p { font-size: 0.85em; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.step-text code { background: #111; padding: 2px 6px; border: 1px solid #333; color: var(--accent); font-family: monospace; font-size: 0.9em; word-break: break-all; }
.step-list { list-style: none; padding-left: 0; margin-bottom: 10px; }
.step-list li { position: relative; padding-left: 15px; font-size: 0.85em; color: var(--text-muted); margin-bottom: 5px; line-height: 1.5; }
.step-list li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }
.step-list a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); transition: opacity 0.2s; }
.step-list a:hover { opacity: 0.8; border-bottom-style: solid; }

.guide-warning { margin-top: 30px; padding: 15px; background: rgba(255, 51, 51, 0.1); border: 1px solid #ff3333; color: #ff3333; font-size: 0.85em; line-height: 1.5; text-align: center; font-weight: 500; }

@media (max-width: 600px) { 
    .container { padding: 20px; } 
    .preview-row { grid-template-columns: 1fr; } 
    .btn-row { flex-direction: column; } 
    .header h1 { font-size: 1.8em; } 
    .link-item { flex-direction: column; align-items: flex-start; gap: 5px; }
    .link-item span { text-align: left; margin-left: 0; }
    .copy-btn { position: absolute; right: 15px; top: 15px; }
    .link-item { position: relative; padding-right: 50px; }
}