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

:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --card-bg: #1a1a1a;
    --card-hover-bg: #252525;
    --border-color: #333;
    --subtext-color: #888;
    --label-color: #b4b4b4;
    --select-bg: #0f0f0f;
    --output-bg: #0f0f0f;
    --footer-bg: #0f0f0f;
}

body.light-mode {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --card-hover-bg: #f0f0f0;
    --border-color: #ddd;
    --subtext-color: #555;
    --label-color: #333;
    --select-bg: #ffffff;
    --output-bg: #f5f5f5;
    --footer-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.3s ease;
}

.theme-toggle:hover {
    background: var(--card-hover-bg);
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--subtext-color);
    font-size: 1.1rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: var(--card-hover-bg);
    border-color: #667eea;
}

.github-icon {
    width: 20px;
    height: 20px;
}

.input-section {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--label-color);
    font-weight: 500;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.option-group {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.option-group h3 {
    margin-bottom: 1rem;
    color: #667eea;
    font-size: 1.1rem;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--select-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.output-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-header h3 {
    color: #667eea;
}

.copy-button {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: var(--card-hover-bg);
    border-color: #667eea;
}

.output-content {
    background: var(--output-bg);
    color: var(--text-color);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    color: var(--subtext-color);
    font-size: 0.9rem;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.disclaimer {
    margin-top: 0.5rem;
    color: var(--subtext-color);
    font-size: 0.8rem;
}

.loading {
    display: none;
    text-align: center;
    padding: 2rem;
    color: #667eea;
}

.loading.active {
    display: block;
}

.error {
    background: #2a1a1a;
    border: 1px solid #ff4444;
    color: #ff6666;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
}

.error.active {
    display: block;
}
