:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
}

.main-header {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    right: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-login {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
}

.btn-login:hover {
    background: var(--primary-hover);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

p.subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input[type="url"],
input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.subdomain-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subdomain-input-group input {
    text-align: right;
}

.domain-suffix {
    color: var(--text-muted);
    font-weight: 500;
}

.toggle-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
}

.status-msg {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.available {
    color: var(--success);
}

.taken {
    color: var(--error);
}

.result-card {
    margin-top: 2rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 0.75rem;
    text-align: center;
    display: none;
}

.result-url {
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 0.5rem;
    word-break: break-all;
}

/* Captcha Styles */
.captcha-container {
    margin-top: 1.5rem;
    display: none;
    position: relative;
    width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.captcha-bg-wrapper {
    position: relative;
    width: 300px;
    height: 150px;
    background: #eee;
    border-radius: 0.5rem;
    overflow: hidden;
}

#captcha-canvas {
    display: block;
}

#puzzle-piece {
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.slider-track {
    margin-top: 1rem;
    width: 100%;
    height: 40px;
    background: #e2e8f0;
    border-radius: 20px;
    position: relative;
}

.slider-handle {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.slider-handle:active {
    cursor: grabbing;
}

.slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}