:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    line-height: 1.5;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin-top: 40px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-weight: 400;
    font-size: 2.2rem;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

/* Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.mt-small {
    margin-top: 5px;
}

/* Buttons */
.actions {
    margin-top: 20px;
    text-align: right;
}

.btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn.secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    text-decoration: none;
    display: inline-block;
}

.btn.secondary:hover {
    background-color: #f1f3f4;
}

/* Result Area */
.hidden {
    display: none;
}

.result-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.result-textarea {
    height: 200px;
    font-family: monospace;
}

.input-with-copy {
    display: flex;
    gap: 10px;
}

.btn-copy {
    padding: 0 16px;
    background-color: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
}

.btn-copy:hover {
    background-color: #e8eaed;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Notice */
.notice {
    background-color: #e8f0fe;
    color: #1967d2;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .app-container {
        padding: 10px;
        margin-top: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Success Message */
.success-msg {
    color: #1e8e3e; /* Green color similar to original */
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1rem;
}
