:root {
    --background: #ffffff;
    --surface: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #e8e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

main.container {
    margin-top: 32px;
    margin-bottom: 64px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 980px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #f5f5f7;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e8e8ed;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.code-box {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 24px 0;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: monospace;
}

.copy-btn {
    background: #e8e8ed;
    border: none;
    padding: 10px 20px;
    border-radius: 980px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    min-height: 44px;
}

.copy-btn:hover {
    background: #d2d2d7;
}

.instruction, .warning, .success {
    padding: 20px;
    border-radius: 16px;
    margin: 24px 0;
    border-left: 4px solid;
}

.instruction {
    background: #f5f5f7;
    border-left-color: var(--accent);
}

.warning {
    background: #fff7e5;
    border-left-color: #ff9500;
}

.success {
    background: #e6f4ea;
    border-left-color: #34c759;
}

.steps-accordion {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: white;
}

.step-header {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    min-height: 60px;
}

.step-header:hover {
    background: #f5f5f7;
}

.step-icon {
    font-size: 1.5rem;
    color: var(--accent);
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    flex: 1;
    font-size: 1rem;
    line-height: 1.3;
}

.step-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.step-arrow.rotated {
    transform: rotate(180deg);
}

.step-content {
    padding: 0 20px 20px 68px;
    display: none;
    border-top: 1px solid var(--border);
    background: #fafafc;
}

.step-content.show {
    display: block;
}

.step-detail {
    margin: 14px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.flash-messages {
    margin-bottom: 24px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #f5f5f7;
    border-left: 4px solid;
    font-size: 0.95rem;
}

.flash i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.flash span {
    flex: 1;
}

.flash.success {
    border-left-color: #34c759;
}
.flash.danger {
    border-left-color: #ff3b30;
}
.flash.warning {
    border-left-color: #ff9500;
}
.flash.info {
    border-left-color: var(--accent);
}

footer {
    background: #f5f5f7;
    padding: 32px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    main.container {
        margin-top: 24px;
        margin-bottom: 48px;
    }
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    h3 {
        font-size: 1.1rem;
    }
    .btn, .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    .code-box {
        font-size: 1.4rem;
        letter-spacing: 1px;
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    .step-header {
        padding: 14px 16px;
        gap: 10px;
    }
    .step-icon {
        font-size: 1.3rem;
        width: 32px;
    }
    .step-title {
        font-size: 0.95rem;
    }
    .step-content {
        padding-left: 56px;
        padding-right: 16px;
    }
    .step-detail {
        margin: 12px 0;
    }
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .feature-item {
        padding: 20px;
    }
    .info-block {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    .card {
        padding: 16px;
    }
    .step-content {
        padding-left: 48px;
    }
    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    .flash {
        padding: 10px 12px;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.feature-item {
    background: #f5f5f7;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-block {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 24px;
    margin: 32px 0;
}

/* Прогресс-бар для сбросов */
.reset-progress {
    background: #e8e8ed;
    border-radius: 6px;
    height: 8px;
    width: 100%;
    margin: 12px 0;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.3s ease;
}
.reset-status {
    font-size: 0.9rem;
    margin: 8px 0;
}
.warning-text {
    color: #ff9500;
    font-weight: 500;
}
.danger-text {
    color: #ff3b30;
    font-weight: 500;
}
.url-status {
    margin-top: 8px;
    font-size: 0.85rem;
}