:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    --border-color: #ddd;
    --input-bg: #fff;
    --success-color: #10b981;
    --error-color: #ef4444;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #e5e7eb;
    --text-secondary: #a1a1aa;
    --accent-color: #60a5fa;
    --border-color: #3f3f46;
    --input-bg: #2d2d2d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 900px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.main-content {
    display: flex;
    flex-direction: row;
}

.sidebar {
    flex: 1;
    background-color: rgba(0,0,0,0.02);
    padding: 40px 30px;
    border-right: 1px solid var(--border-color);
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.domain-list {
    list-style: none;
}

.domain-item {
    margin-bottom: 10px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.domain-item a {
    color: var(--text-primary);
    display: block;
    font-weight: 600;
    padding: 15px;
    text-decoration: none;
}

.domain-item:hover, .domain-item.highlight {
    border-color: var(--accent-color);
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.domain-item.highlight {
    border-left-width: 10px;
}

.form-section {
    flex: 1.5;
    padding: 40px;
}

.form-section h2 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

input {
    transition: var(--transition);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

input[readonly] {
    background-color: rgba(0,0,0,0.05);
    font-weight: bold;
    color: var(--accent-color);
}

button.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

button.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button.btn-submit:hover:not(:disabled) {
    filter: brightness(1.1);
}

.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-message.success {
    background-color: var(--success-color);
}

.toast-message.error {
    background-color: var(--error-color);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

.loading-card {
    background-color: var(--card-bg);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-card span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
