:root {
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --bg-input: #1f1f1f;
    --primary-color: #ffffff;
    --primary-hover: #e5e5e5;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: #27272a;
    --success-color: #10b981;
    --error-color: #ef4444;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Better for mobile scrolling */
    padding: 2rem 1.5rem;
    line-height: 1.5;
}

.app-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.app-header {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.logo i {
    color: var(--text-muted);
}

.logo h1 {
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.logo h1 span {
    font-weight: 300;
    color: var(--text-muted);
}

.app-header p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
}

.app-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.glass-card h2 i {
    color: var(--text-muted);
    font-size: 1rem;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 300;
}

textarea {
    width: 100%;
    height: 180px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 300;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.instructions-textarea {
    height: 80px;
    margin-top: 0.2rem;
    font-size: 0.9rem;
    resize: none;
}

textarea:focus {
    outline: none;
    border-color: #52525b;
}

textarea::placeholder {
    color: #52525b;
}

.primary-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    background: #27272a;
    color: #52525b;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

#progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1.25rem;
}

/* Log List */
.log-list {
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-right: 0.5rem;
}

.log-list::-webkit-scrollbar {
    width: 4px;
}

.log-list::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 2px;
}

.log-item {
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #d4d4d8;
    font-weight: 300;
    border-left: 2px solid transparent;
    animation: slideIn 0.2s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-item.success {
    border-left-color: var(--success-color);
}

.log-item.error {
    border-left-color: var(--error-color);
}

.log-item i.success {
    color: var(--success-color);
}

.log-item i.error {
    color: var(--error-color);
}

.log-item a {
    color: var(--text-main);
    text-decoration: underline;
    margin-left: auto;
    font-weight: 500;
    font-size: 0.8rem;
}

.log-item a:hover {
    color: var(--text-muted);
}

/* ----------------------------------
   Mobile Responsiveness
----------------------------------- */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        align-items: flex-start;
    }

    .app-container {
        margin-top: 1rem;
        gap: 1.5rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .app-header p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    .app-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .glass-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .glass-card h2 {
        font-size: 1.1rem;
    }

    textarea {
        height: 150px;
        font-size: 16px; /* Prevents iOS Safari zoom */
        padding: 0.875rem;
    }
    
    .primary-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .log-list {
        max-height: 200px;
    }
    
    .log-item {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
}
