:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    padding: 40px 0 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

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

.feature {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: var(--bg-color);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

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

.form-section {
    margin: 40px 0;
}

.form-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-suffix input {
    flex: 1;
}

.suffix {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
}

button[type="submit"]:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.result.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.result.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

.result.loading {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.result a {
    color: inherit;
    text-decoration: underline;
    font-weight: bold;
}

.info {
    margin-top: 50px;
    padding: 30px;
    background: var(--bg-color);
    border-radius: 10px;
}

.info h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.info li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.info code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}
