/* ===================================
   Discord DJ Lineup Generator - Styles
   Dark Theme Professional Design
   =================================== */

/* === CSS Variables === */
:root {
    /* Colors - Pink to Purple Pastel Theme */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --bg-hover: #3a3a3a;
    --bg-active: #404040;
    
    --text-primary: #ffffff;
    --text-secondary: #d4a5d4;
    --text-muted: #9a7ba0;
    
    --accent-primary: #e879f9;
    --accent-hover: #d946ef;
    --accent-light: #f0abfc;
    --accent-secondary: #c084fc;
    
    --success: #e879f9;
    --success-hover: #d946ef;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f0abfc;
    
    --border-color: #404040;
    --border-radius: 12px;
    --border-radius-small: 8px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* === Animated Gradient === */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.animated-gradient-text {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Global Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding: 8px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improve touch targets on mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .quick-slots-btn,
    .quick-duration-btn,
    .format-btn,
    .slot-btn,
    .toggle-card {
        min-height: 44px; /* Apple's recommended minimum touch target */
    }
}

/* === Container === */
.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 12px;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    overflow-y: auto;
    padding: 0 12px;
    height: 100vh;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.sidebar-content {
    padding: 0 12px;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide mobile export section on desktop */
.mobile-export {
    display: none;
}

/* Show desktop sections by default */
.desktop-export,
.desktop-format {
    display: block;
}

/* === Header === */
.header {
    text-align: center;
    margin-bottom: 12px;
    padding: 12px 0;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === Card Component === */
.card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card h2 i {
    margin-right: 4px;
    color: var(--accent-light);
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.card h3 i {
    margin-right: 4px;
    color: var(--text-muted);
}

/* === Section Descriptions === */
.section-description {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.85rem;
}

/* === Quick Start Section === */
.quick-start-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
}

.quick-options-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 10px;
    align-items: start;
}

.quick-option-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.quick-option-section .time-input {
    width: 100%;
}

.quick-label {
    min-height: 24px;
    display: flex;
    align-items: center;
}

.quick-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    min-height: 36px;
}

.quick-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
}

.quick-slots-btn,
.quick-duration-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 50px;
}

.quick-slots-btn:hover,
.quick-duration-btn:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-hover);
}

.quick-slots-btn.active,
.quick-duration-btn.active {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(232, 121, 249, 0.4);
}

.custom-number-input {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.9rem;
    width: 80px;
    transition: all var(--transition-fast);
}

.custom-number-input:hover {
    border-color: var(--accent-light);
}

.custom-number-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.1);
}

/* === Inline Editable Slots === */
.slot-card {
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    display: grid;
    grid-template-columns: auto 1fr 90px 110px auto;
    gap: 8px;
    align-items: center;
    transition: all var(--transition-fast);
}

.slot-card:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-hover);
}

.slot-card input.text-input-inline {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 4px 8px;
    transition: border-color var(--transition-fast);
}

.slot-card input.text-input-inline:hover {
    border-bottom-color: var(--accent-light);
}

.slot-card input.text-input-inline:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
    background-color: rgba(232, 121, 249, 0.05);
}

.slot-card input.text-input-inline::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.slot-card .duration-input-inline,
.slot-card .time-input-inline-small {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 6px 10px;
    transition: all var(--transition-fast);
    width: 100%;
}

.slot-card .duration-input-inline:focus,
.slot-card .time-input-inline-small:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(232, 121, 249, 0.2);
}

/* === Toggle Cards === */
.toggle-card {
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 6px;
}

.toggle-card:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toggle-card.active {
    border-color: var(--accent-primary);
    background: linear-gradient(270deg, rgba(232, 121, 249, 0.15), rgba(192, 132, 252, 0.1), rgba(167, 139, 250, 0.1), rgba(96, 165, 250, 0.1), rgba(167, 139, 250, 0.1), rgba(192, 132, 252, 0.1), rgba(232, 121, 249, 0.15));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.2);
}

.toggle-icon {
    font-size: 2rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.toggle-card.active .toggle-icon {
    color: var(--accent-primary);
}

.toggle-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.toggle-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-status {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.toggle-card.active .toggle-status {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: var(--bg-primary);
}

.toggle-card.active .toggle-status::before {
    content: 'ON';
}

.toggle-card:not(.active) .toggle-status::before {
    content: 'OFF';
}

.text-input-inline,
.time-input-inline {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 8px 12px;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    width: 100%;
}

.text-input-inline:focus,
.time-input-inline:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(232, 121, 249, 0.2);
}

.toggle-card:not(.active) .text-input-inline,
.toggle-card:not(.active) .time-input-inline {
    opacity: 0.5;
    pointer-events: none;
}

/* === Section Header === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* === Buttons === */
.btn {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    white-space: nowrap;
}

.btn i {
    font-size: 1.1em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-hover);
}

.btn-success {
    background: linear-gradient(270deg, #e879f9, #c084fc, #a78bfa, #60a5fa, #a78bfa, #c084fc, #e879f9);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-success:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 121, 249, 0.4);
}

.btn-success:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(232, 121, 249, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--text-primary);
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--danger-hover);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 36px;
}

.btn-large {
    padding: 10px 20px;
    font-size: 0.95rem;
    min-height: 40px;
    width: 100%;
    justify-content: center;
}

.btn .icon {
    font-size: 1.2em;
}

/* === Inputs === */
.text-input,
.time-input,
.duration-input,
.duration-select {
    font-family: var(--font-primary);
    font-size: 1rem;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    transition: border-color var(--transition-fast);
    min-height: 44px;
}

.text-input:focus,
.time-input:focus,
.duration-input:focus,
.duration-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.2);
}

.text-input:disabled,
.time-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input {
    width: 100%;
}

/* === Event Details === */
.event-markers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.marker-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-md);
    align-items: center;
}

.marker-row.custom-marker {
    grid-template-columns: auto 1fr 1fr;
}

.marker-toggle {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.marker-row label {
    color: var(--text-secondary);
    min-width: 120px;
}

.marker-row label i {
    margin-right: var(--spacing-xs);
    color: var(--accent-light);
}

/* === Bulk Actions === */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.bulk-actions label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.bulk-actions label i {
    margin-right: var(--spacing-xs);
    color: var(--text-muted);
}

/* === Lineup Slots === */
.lineup-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.slot-card {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-md);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-md);
    align-items: center;
    transition: all var(--transition-fast);
}

.slot-card:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-hover);
}

.slot-drag-handle {
    cursor: grab;
    font-size: 1.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
}

.slot-drag-handle:active {
    cursor: grabbing;
}

.slot-drag-handle i {
    font-size: 1.3em;
}

.slot-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.slot-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.slot-details {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.slot-time,
.slot-duration {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.slot-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.slot-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
    font-size: 1.1rem;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-btn i {
    font-size: 1.2em;
}

.slot-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.slot-btn.delete:hover {
    background-color: var(--danger);
    color: var(--text-primary);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    color: var(--text-muted);
}

.empty-state.hidden {
    display: none;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

.empty-state p {
    margin-bottom: var(--spacing-sm);
}

.empty-state-hint {
    font-size: 0.9rem;
}

/* === Format Selector === */
.format-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.format-btn {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.format-btn:hover {
    border-color: var(--accent-light);
    background-color: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.format-btn.selected {
    border-color: var(--accent-primary);
    background: linear-gradient(270deg, rgba(232, 121, 249, 0.25), rgba(192, 132, 252, 0.2), rgba(167, 139, 250, 0.2), rgba(96, 165, 250, 0.2), rgba(167, 139, 250, 0.2), rgba(192, 132, 252, 0.2), rgba(232, 121, 249, 0.25));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.3), var(--shadow-md);
    transform: translateY(-2px);
}

.format-preview {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.format-description-tooltip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* === Export Section === */
.export-options {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-small);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.checkbox-label span {
    font-weight: 500;
}

.export-preview {
    margin-bottom: 12px;
}

.preview-box {
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.copy-feedback {
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-feedback.success {
    background: linear-gradient(270deg, rgba(232, 121, 249, 0.25), rgba(192, 132, 252, 0.2), rgba(167, 139, 250, 0.2), rgba(96, 165, 250, 0.2), rgba(167, 139, 250, 0.2), rgba(192, 132, 252, 0.2), rgba(232, 121, 249, 0.25));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: var(--accent-light);
    border: 1.5px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(232, 121, 249, 0.3);
}

.copy-feedback.error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1.5px solid var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.modal-header h2 i {
    margin-right: var(--spacing-sm);
    color: var(--accent-light);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
}

.modal-close i {
    font-size: 1.5em;
}

.modal-close:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

/* === Form === */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 4px;
    color: var(--accent-light);
}

.duration-controls {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: var(--spacing-sm);
    align-items: center;
}

.duration-slider {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    cursor: pointer;
    border-radius: 50%;
}

.duration-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.duration-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.footer p {
    margin-bottom: 4px;
}

.footer-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px !important;
}

.footer-info i {
    margin-right: var(--spacing-xs);
    color: var(--accent-light);
}

.footer-credits {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-credits a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.footer-credits a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.footer-note {
    font-size: 0.75rem;
}

/* === Responsive Design === */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .main-content,
    .sidebar-content {
        height: auto;
        overflow-y: visible;
    }
    
    .sidebar-content {
        position: relative;
        display: none; /* Hide sidebar on mobile/tablet */
    }
    
    /* Show mobile export section */
    .mobile-export {
        display: block;
    }
    
    /* Hide desktop sections */
    .desktop-export,
    .desktop-format {
        display: none;
    }
}

/* Tablet/Medium screens */
@media (max-width: 992px) {
    .quick-options-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 4px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bulk-actions label {
        text-align: left;
    }
    
    .quick-start-controls {
        grid-template-columns: 1fr;
    }
    
    /* Stack the 3 columns on mobile */
    .quick-options-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-buttons {
        flex-wrap: wrap;
    }
    
    .quick-slots-btn,
    .quick-duration-btn {
        flex: 1;
        min-width: 55px;
    }
    
    .slot-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .slot-drag-handle {
        display: none;
    }
    
    .slot-actions {
        justify-content: flex-end;
        grid-column: 1;
    }
    
    .toggle-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        padding: 12px;
    }
    
    .toggle-status {
        grid-column: 2;
        justify-self: end;
    }
    
    .toggle-content {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .toggle-icon {
        font-size: 1.5rem;
    }
    
    .format-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .export-buttons {
        grid-template-columns: 1fr;
    }
    
    .duration-controls {
        grid-template-columns: 1fr;
    }
    
    .marker-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    
    .marker-row input[type="datetime-local"] {
        grid-column: 2;
    }
    
    .marker-row.custom-marker {
        grid-template-columns: auto 1fr;
    }
    
    /* Better button spacing on mobile */
    .btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    /* Improve text input on mobile */
    .text-input,
    .time-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    body {
        padding: 4px;
    }
    
    .container {
        padding: 0;
        gap: 8px;
    }
    
    .main-content,
    .sidebar-content {
        padding: 0 8px;
    }
    
    .card {
        padding: 8px;
        border-radius: 8px;
    }
    
    .header {
        padding: 8px 0;
        margin-bottom: 8px;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .card h2 {
        font-size: 1rem;
    }
    
    .section-description {
        font-size: 0.8rem;
    }
    
    .format-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .format-btn {
        min-height: 44px;
        padding: 10px 8px;
    }
    
    .format-preview {
        font-size: 0.85rem;
    }
    
    .quick-buttons {
        gap: 4px;
    }
    
    .quick-slots-btn,
    .quick-duration-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 45px;
    }
    
    .custom-number-input {
        width: 70px;
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .btn-large {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .preview-box {
        font-size: 0.8rem;
        padding: 8px;
        max-height: 300px;
    }
    
    .toggle-card {
        padding: 10px;
    }
    
    .toggle-label {
        font-size: 1rem;
    }
    
    .text-input-inline,
    .time-input-inline {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    /* Stack export buttons vertically on small mobile */
    .export-buttons {
        gap: 8px;
    }
    
    /* Adjust slot card for very small screens */
    .slot-card {
        padding: 8px;
        gap: 6px;
    }
    
    .slot-card input.text-input-inline {
        font-size: 1rem;
    }
    
    .slot-actions {
        gap: 4px;
    }
    
    .slot-btn {
        padding: 6px;
        min-height: 32px;
        min-width: 32px;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* === Utility Classes === */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
