:root {
    --bg-body: #0a0a0c;
    --bg-input: #edf2f7; 
    --bg-input-dark: #1a1a1e; 
    --accent: #ffb400; 
    --text-main: #ffffff;
    --text-muted: #85858b;
    --btn-primary: #ffffff;
    --btn-primary-text: #000000;
    --btn-secondary: #333336;
    --btn-secondary-text: #ffffff;
    --step-active: #ffb400; 
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
}

.view {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}
.view.active { display: flex; opacity: 1; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-text { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 40px; color: var(--accent); }

.logo-img { 
    display: block; 
    margin: 0 auto 20px auto; 
    max-width: 90px; 
    height: auto; 
}

.title { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 30px; line-height: 1.5; }

.form-group { margin-bottom: 20px; position: relative; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: #d4d4d8; }

.input-base {
    width: 100%;
    background: var(--bg-input);
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: #000000;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
}
.input-base::placeholder { color: #a1a1aa; }
.input-base:focus { box-shadow: 0 0 0 2px var(--accent); }

.input-dark {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
}
.input-dark:focus { border-color: var(--accent); box-shadow: none; }

.eye-icon {
    position: absolute;
    right: 16px;
    top: 40px;
    cursor: pointer;
    color: #a1a1aa;
}

.code-container { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 30px; }
.code-input {
    width: 50px; height: 60px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    font-size: 24px; font-weight: 600;
    text-align: center; color: white;
    outline: none; transition: var(--transition);
}
.code-input:focus { border-color: var(--accent); }

.btn {
    width: 100%; padding: 16px;
    border-radius: 100px; border: none;
    font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    margin-bottom: 15px;
}
.btn-primary { background: var(--btn-primary); color: var(--btn-primary-text); }
.btn-primary:hover { background: #e4e4e7; }
.btn-secondary { background: var(--btn-secondary); color: var(--btn-secondary-text); }
.btn-secondary:hover { background: #404040; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.link-text { color: var(--text-muted); font-size: 13px; text-align: center; display: block; text-decoration: none; cursor:pointer;}
.link-text span { color: var(--accent); font-weight: 500; }
.link-text:hover span { text-decoration: underline; }
.terms-text { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.terms-text a { color: var(--accent); text-decoration: none; }

.error-msg { color: #ef4444; font-size: 14px; margin-bottom: 15px; text-align: center; display: none; }

.steps-container { display: flex; align-items: center; justify-content: center; margin-bottom: 40px; }
.step-circle {
    width: 32px; height: 32px;
    border-radius: 50%; background: #333;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: #888;
    transition: var(--transition);
}
.step-circle.active { background: var(--step-active); color: #000; }
.step-line { height: 2px; width: 60px; background: #333; margin: 0 10px; }

.emoji-trigger {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--text-muted);
    cursor: pointer; transition: var(--transition);
}
.emoji-trigger:hover { background: rgba(255,255,255,0.1); }
.emoji-container { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; position:relative; }

.emoji-popup-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}
.emoji-popup {
    background: #1e1e24; border-radius: var(--radius-md);
    padding: 15px; width: 300px;
    max-height: 250px; overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none; z-index: 100; border: 1px solid rgba(255,255,255,0.1);
}
.emoji-popup.active { display: block; }
.emoji-category { font-size: 12px; color: #85858b; margin: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.emoji-item { font-size: 22px; text-align: center; cursor: pointer; padding: 5px; border-radius: 8px; transition: 0.2s; }
.emoji-item:hover { background: rgba(255,255,255,0.1); }

.doc-header { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; }
.back-nav { background: rgba(255,255,255,0.1); border:none; border-radius:100px; color:white; padding: 8px 16px; cursor:pointer; font-size:13px; display:flex; align-items:center; gap:5px;}
.doc-content { font-size: 14px; color: #d4d4d8; line-height: 1.6; max-height: 70vh; overflow-y: auto; padding-right: 10px;}
.doc-content h3 { color: white; margin: 20px 0 10px 0; }