/* frontend/style.css */
:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --secondary: #757575;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196F3;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

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

.container { background: var(--card-bg); width: 100%; max-width: 420px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 24px; text-align: center; }

.screen { display: none; animation: fadeIn 0.3s ease-in-out; }
.screen.active { display: block; }

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

h2 { margin-bottom: 16px; font-size: 22px; color: var(--text-main); }
h3 { font-size: 16px; margin-bottom: 12px; color: var(--text-main); }
p { margin-bottom: 16px; font-size: 15px; color: var(--text-light); line-height: 1.5; }

input[type="tel"], input[type="text"], input[type="number"], input[type="password"], textarea { 
    width: 100%; padding: 12px; margin-bottom: 16px; border: 1px solid #ccc; border-radius: 8px; font-size: 16px; outline: none; transition: border 0.2s; 
}
input:focus, textarea:focus { border-color: var(--primary); }

button { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background 0.2s, transform 0.1s; margin-bottom: 12px; }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); }
.btn-success { background-color: #2E7D32; color: white; }
.btn-secondary { background-color: #e0e0e0; color: var(--text-main); }
.btn-small { padding: 10px; font-size: 14px; }
.btn-icon { width: 40px; height: 40px; padding: 0; font-size: 20px; border-radius: 8px; background: #eee; color: #333; margin: 0; }

.info-card, .calculator-card, .payment-details { background: #f9f9f9; padding: 16px; border-radius: 8px; margin-bottom: 16px; text-align: left; border: 1px solid #eee; }
.info-card p { margin-bottom: 8px; font-size: 15px; }
.info-card p:last-child { margin-bottom: 0; }

.highlight { font-size: 22px; color: var(--danger); }
.highlight-blue { color: var(--info); font-weight: bold; }

/* Slider & Calculator */
.slider-container { margin-bottom: 15px; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.days-input-group { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.days-input-group input { width: 80px; text-align: center; margin: 0; font-weight: bold; font-size: 18px; }
.price-hint { font-size: 13px; color: var(--secondary); text-align: center; margin-bottom: 10px; }
.total-amount { text-align: center; font-size: 18px; font-weight: bold; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ccc; }

/* Copy Group */
.copy-group { display: flex; gap: 8px; align-items: center; }
.copy-group input { margin: 0; flex: 1; background: #fff; font-weight: bold; font-family: monospace; font-size: 15px; }
.copy-group button { width: auto; margin: 0; white-space: nowrap; }

.timer-box { margin: 20px 0; padding: 16px; background: #fff3e0; border-radius: 8px; border: 1px solid #ffe0b2; }
#timer-display { font-size: 32px; font-weight: bold; color: var(--warning); font-variant-numeric: tabular-nums; margin-bottom: 15px; }

.hint, .warning { font-size: 13px; color: var(--secondary); margin-top: -4px; }
.warning { color: var(--warning); font-weight: 500; }

.icon-success, .icon-clock { font-size: 64px; margin-bottom: 16px; }

.hidden { display: none !important; }

/* Admin Panel Styles */
.admin-section { text-align: left; margin-bottom: 24px; border-bottom: 1px solid #eee; padding-bottom: 16px; }
.list-container { max-height: 300px; overflow-y: auto; font-size: 14px; }
.admin-item { background: #f9f9f9; padding: 12px; border-radius: 6px; margin-bottom: 10px; border: 1px solid #ddd; }
.admin-item p { margin-bottom: 6px; font-size: 13px; }
.admin-item a { color: var(--primary); text-decoration: none; font-weight: bold; }
label { display: block; font-size: 13px; font-weight: bold; color: #555; margin-bottom: 5px; }

/* Toast Notifications */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 400px; }
.toast { background: #333; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); animation: fadeIn 0.3s, fadeOut 0.3s 2.7s forwards; text-align: center; }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* iOS Prompt */
#ios-prompt { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.6); z-index: 10000; display: flex; justify-content: center; align-items: flex-end; padding: 16px; }
.ios-prompt-content { background: white; padding: 20px; border-radius: 16px 16px 0 0; width: 100%; max-width: 400px; text-align: left; animation: slideUp 0.3s ease-out; }
.ios-prompt-content ol { margin-left: 20px; margin-bottom: 16px; color: var(--text-light); font-size: 14px; line-height: 1.6; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* frontend/style.css */
/* Phone Input & Mask Styles */                                                                                /* изменено# */
.phone-input-container { display: flex; gap: 8px; margin-bottom: 16px; text-align: left; }                     /* изменено# */
#country-code { width: 105px; padding: 12px 8px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; background: #fff; outline: none; cursor: pointer; } /* изменено# */
.mask-wrapper { position: relative; flex: 1; display: flex; align-items: center; background: #fff; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; transition: border 0.2s; } /* изменено# */
.mask-wrapper:focus-within { border-color: var(--primary); }                                                   /* изменено# */
.mask-bg { position: absolute; left: 12px; color: #bbb; pointer-events: none; font-family: monospace; font-size: 16px; letter-spacing: 1px; white-space: pre; z-index: 1; } /* изменено# */
.mask-input { width: 100%; padding: 12px; border: none !important; background: transparent !important; font-family: monospace; font-size: 16px; letter-spacing: 1px; color: #333; z-index: 2; margin-bottom: 0 !important; outline: none; } /* изменено# */