:root {
    --bg-dark: #1A1A2E;
    --bg-panel: #16213E;
    --bg-input: #0F3460;
    --text-primary: #00FF88;
    --text-muted: #8E9DB0;
    --text-white: #EAEAEA;
    --border-color: #0F3460;
    --error: #FF4A4A;
    --hover-primary: #00CC6A;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

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

header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Fira Code', monospace;
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -1px;
}

.prompt-symbol {
    font-weight: 700;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    font-family: 'Fira Code', monospace;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-white);
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-content.active {
    display: flex;
}

/* Panels */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

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

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.box-title {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.panel-header .box-title {
    margin-bottom: 0;
}

/* Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cron-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cron-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 1.25rem;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border-radius: 6px;
    letter-spacing: 2px;
}

.cron-input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.cron-input.error {
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 0 2px rgba(255, 74, 74, 0.2);
}

.icon-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.icon-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
}

.error-text {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.hidden {
    display: none !important;
}

/* Field Breakdown */
.field-breakdown {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.field-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 60px;
    background: var(--bg-input);
    padding: 0.75rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.field-item:hover {
    border-color: var(--text-primary);
}

.field-val {
    font-family: 'Fira Code', monospace;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.field-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Translation Box */
.translation-box {
    background: var(--bg-input);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--text-primary);
}

.translation-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-white);
    line-height: 1.6;
}

/* Executions List */
.tz-select {
    background: var(--bg-input);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    outline: none;
}

.execution-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.execution-item {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: var(--bg-input);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-white);
}

.execution-item span:first-child {
    color: var(--text-primary);
    min-width: 20px;
}

/* Presets & History */
.presets-container h4,
.history-container h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-btn {
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-white);
}

.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.history-item {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: 4px;
}

.history-item:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Builder Tab */
.builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.build-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.build-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.build-group select,
.build-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    outline: none;
}

.build-group select:focus,
.build-group input:focus {
    border-color: var(--text-primary);
}

.cron-result-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-input);
    padding: 1rem;
    border-radius: 6px;
    border: 1px dashed var(--text-primary);
    margin-top: 0.5rem;
}

.primary-btn {
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.font-mono {
    font-family: 'Fira Code', monospace;
}

.text-xl {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}