/* General reset and typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Headings */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

/* Paragraphs and text */
p {
    margin-bottom: 0.5rem;
    color: #4a4a4a;
}

/* Inputs and textareas */
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    height: 100px;
    resize: vertical;
}

/* Checkbox */
input[type="checkbox"] {
    margin-top: 1rem;
    margin-right: 0.5rem;
}

/* File input */
input[type="file"] {
    margin: 1.5rem 0;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    padding: 8px 16px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #4f46e5;
}

/* Labels */
label {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
}

/* Buttons */
button {
    margin-top: 1.5rem;
    padding: 12px 24px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Setting box */
.setting-box {
    border: none;
    padding: 1.5rem;
    margin: 1rem 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.setting-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* COND_TYPE_SWITCH specific styling */
.setting-box.switch-condition {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.setting-box.switch-condition h2 {
    color: #15803d;
}

/* Debug section */
#debug {
    white-space: pre-wrap;
    background-color: #1a1a1a;
    color: #e5e7eb;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 12px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Export section */
.export-section {
    display: none;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.export-section.visible {
    display: block;
}

.filename-input {
    width: 48%;
    display: inline-block;
    margin-right: 4%;
}

.filename-input:last-child {
    margin-right: 0;
}

/* Help section */
.help-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.help-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1a1a1a;
}

.help-section h2::after {
    content: '▼';
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.help-section.collapsed h2::after {
    transform: rotate(-90deg);
}

.help-content {
    display: block;
    font-size: 0.95rem;
    color: #4a4a4a;
}

.help-section.collapsed .help-content {
    display: none;
}

.help-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.help-content ul li {
    margin-bottom: 0.5rem;
}

/* Footer section */
.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-text {
    font-size: 0.95rem;
    color: #4a4a4a;
    font-weight: 500;
}

.discord-text {
    font-size: 0.9rem;
}

/* Social links */
.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #f5f7fa;
    color: #4a4a4a;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

.social-link:hover {
    background-color: #6366f1;
    color: #fff;
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .filename-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .setting-box {
        padding: 1rem;
    }

    .help-section {
        padding: 1rem;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-avatar {
        width: 72px;
        height: 72px;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-link {
        width: 28px;
        height: 28px;
    }

    .social-icon {
        width: 18px;
        height: 18px;
    }
}