:root {
    --primary: #E6007E;
    --primary-dark: #B3005F;
    --primary-light: #FF3399;
    --bg: #0f0f13;
    --card-bg: #1a1a24;
    --text: #e4e4e7;
    --text-muted: #9ca3af;
    --border: #2a2a3a;
    --success: #10b981;
    --error: #ef4444;
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image:
        radial-gradient(ellipse at top, rgba(230, 0, 126, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(230, 0, 126, 0.04) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 480px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.logo h1 span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 15px;
}

.form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 0, 126, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group .hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-group .error-msg {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 4px;
    min-height: 16px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(230, 0, 126, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 1s linear infinite;
}

.spinner circle {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.result {
    text-align: center;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.result.success .result-title {
    color: var(--success);
}

.result.error .result-title {
    color: var(--error);
}

.result-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.info-section {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 24px;
}

.info-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text);
}

.info-section ol {
    padding-left: 20px;
}

.info-section li {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.4;
}

.devices {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 24px;
}

.devices h3 {
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--text);
    text-align: center;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.device:hover {
    border-color: var(--primary);
}

.device svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.device span {
    font-size: 11px;
    color: var(--text-muted);
}

footer {
    text-align: center;
    margin-top: 24px;
}

footer p {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 520px) {
    .card {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .device-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
