/* Common styles for tools.aizavod.top */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100dvh;
}

.nav {
    padding: 16px 20px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #1a1a2e;
}
.nav-home { color: #4a9eff; text-decoration: none; }
.nav-home:hover { text-decoration: underline; }
.nav-sep { margin: 0 8px; }
.nav-current { color: #aaa; }

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

h1 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    font-size: 15px;
    margin-bottom: 28px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab {
    background: #1a1a2e;
    border: 1px solid #252540;
    color: #aaa;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.tab:hover { border-color: #4a9eff; color: #fff; }
.tab.active { background: #4a9eff; color: #fff; border-color: #4a9eff; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Result box */
.result-box {
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    word-break: break-all;
}
.result-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #4a9eff;
    flex: 1;
    user-select: all;
}
.big-result {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    justify-content: center;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
}
.big-result.animate {
    animation: pop 0.3s ease;
}
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}
.copy-btn:hover { background: #1a1a2e; }

/* Strength bar */
.strength-bar {
    height: 6px;
    background: #1a1a2e;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
    width: 0;
}
.strength-label {
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Controls */
.controls {
    margin: 20px 0;
}
.control-row {
    margin-bottom: 16px;
}
.control-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #aaa;
}
.control-row input[type="range"] {
    width: 100%;
    accent-color: #4a9eff;
}
.checkboxes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #ccc;
    cursor: pointer;
}
.checkboxes input[type="checkbox"] {
    accent-color: #4a9eff;
    width: 18px;
    height: 18px;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 12px;
    cursor: pointer;
}
.checkbox-inline input { accent-color: #4a9eff; }

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 14px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.primary-btn:hover { background: #3a8eef; }
.primary-btn:active { background: #2a7edf; }

.secondary-btn {
    padding: 10px 20px;
    background: #1a1a2e;
    color: #aaa;
    border: 1px solid #252540;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.secondary-btn:hover { border-color: #4a9eff; color: #fff; }

/* Inputs */
.text-input {
    width: 100%;
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    color: #e0e0e0;
    padding: 14px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.text-input:focus { border-color: #4a9eff; }

.range-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.input-group {
    flex: 1;
    min-width: 80px;
}
.input-group.full { flex: 100%; }
.input-group label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}
.input-group input[type="number"],
.input-group input[type="text"],
.input-group select {
    width: 100%;
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    color: #e0e0e0;
    padding: 10px 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.input-group input:focus,
.input-group select:focus { border-color: #4a9eff; }
.input-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid #1a1a2e;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    padding: 2px;
}

.color-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.wifi-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}
.stat-card {
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #4a9eff;
}
.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Limits */
.limits-section {
    margin: 24px 0;
}
.limits-section h3 {
    font-size: 15px;
    color: #aaa;
    margin-bottom: 12px;
}
.limits-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.limit-item {
    background: #12121a;
    border-radius: 8px;
    padding: 10px 14px;
}
.limit-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}
.limit-over { color: #ff4444; font-weight: 600; }
.limit-bar {
    height: 4px;
    background: #1a1a2e;
    border-radius: 2px;
    overflow: hidden;
}
.limit-fill {
    height: 100%;
    background: #4a9eff;
    border-radius: 2px;
    transition: width 0.2s;
}
.limit-fill.over { background: #ff4444; }

/* QR output */
.qr-output {
    text-align: center;
    margin: 24px 0;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
}

/* History */
.history {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #1a1a2e;
}
.history h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}
.history-item {
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid #0f0f18;
    color: #888;
}
.history-item code {
    color: #aaa;
    font-size: 12px;
}
.history-label {
    color: #666;
}

/* SEO text */
.seo-text {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #1a1a2e;
}
.seo-text h2 {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 8px;
    margin-top: 20px;
}
.seo-text h2:first-child { margin-top: 0; }
.seo-text p {
    color: #777;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 20px;
    color: #555;
    font-size: 13px;
    border-top: 1px solid #1a1a2e;
}
.footer a { color: #4a9eff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 480px) {
    h1 { font-size: 22px; }
    .container { padding: 24px 16px 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .big-result { font-size: 36px; min-height: 80px; }
    .tab { padding: 6px 12px; font-size: 13px; }
    .stat-value { font-size: 22px; }
}
