:root {
    --bg: #0B0D10;
    --card: #0F141B;
    --stroke: #1D2632;
    --text: #D1D5DB;
    --muted: #9CA3AF;
    --primary: #2D7DFF;
    --primary-dark: #1B4FCC;
    --success: #10B981;
    --warn: #F59E0B;
    --error: #EF4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background: var(--card);
    border-bottom: 1px solid var(--stroke);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 8px;
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 8px;
    height: 12px;
    background: var(--card);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid var(--card);
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary);
    outline: none;
}

.main {
    padding: 32px 0;
}

.section {
    margin-bottom: 48px;
}

.hero {
    margin-bottom: 48px;
}

.hero-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 48px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--muted);
}

.card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.subsection-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dropzone {
    border: 2px dashed var(--stroke);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-within {
    border-color: var(--primary);
    background: rgba(225, 29, 72, 0.05);
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--stroke);
    border-radius: 50%;
    position: relative;
}

.dropzone-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid var(--muted);
    border-top: 3px solid transparent;
    border-radius: 50%;
}

.dropzone-icon::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid var(--muted);
}

.dropzone-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    cursor: pointer;
}

.file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-input:focus + .dropzone-label {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.dropzone-hint {
    font-size: 14px;
    color: var(--muted);
}

.options-accordion {
    border: 1px solid var(--stroke);
    border-radius: 8px;
    overflow: hidden;
}

.options-summary {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    user-select: none;
}

.options-summary::-webkit-details-marker {
    display: none;
}

.options-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.options-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-row {
    display: flex;
    align-items: center;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.option-label-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--stroke);
    border-radius: 12px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text);
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-input:checked + .toggle-switch {
    background: var(--primary);
}

.toggle-input:checked + .toggle-switch::before {
    transform: translateX(20px);
}

.toggle-input:focus + .toggle-switch {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.datetime-input,
.number-input {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.datetime-input:focus,
.number-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

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

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

.btn-primary:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/*  Added warning button style */
.btn-warn {
    background: var(--warn);
    color: white;
}

.btn-warn:hover {
    background: #D97706;
}

.btn-warn:focus {
    outline: 2px solid var(--warn);
    outline-offset: 2px;
}

/*  Added small button size variant */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-blue {
  background: #3b82f6;
  color: white;
}

.btn-blue:hover {
  background: #2563eb;
}

.btn-blue:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.success-card {
    margin-top: 24px;
    padding: 24px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 12px;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.success-icon {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.success-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.success-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.file-info-row {
    display: flex;
    gap: 12px;
}

.file-info-label {
    font-weight: 600;
    color: var(--muted);
    min-width: 80px;
}

.file-info-value {
    color: var(--text);
}

.link-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.link-input,
.link-input-small {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: monospace;
}

.link-input-small {
    padding: 8px;
    font-size: 12px;
}

.link-input:focus,
.link-input-small:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}

.link-hint {
    font-size: 12px;
    color: var(--muted);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab:focus {
    border-color: var(--primary);
    color: var(--primary);
    outline: none;
}

.filter-tab-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.table-wrapper {
    overflow-x: auto;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table th {
    text-align: left;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--stroke);
    font-weight: 600;
    color: var(--muted);
    font-size: 14px;
}

.files-table td {
    padding: 12px;
    border-bottom: 1px solid var(--stroke);
}

.files-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-muted {
    background: rgba(156, 163, 175, 0.2);
    color: var(--muted);
}

.badge-primary {
    background: rgba(35, 29, 225, 0.2);
    color: var(--primary);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warn);
}

.badge-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: var(--stroke);
    border-radius: 50%;
    position: relative;
}

.empty-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--muted);
    border-radius: 50%;
}

.empty-icon::after {
    content: '';
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    background: var(--muted);
    border-radius: 50%;
}

.empty-text {
    font-size: 16px;
    color: var(--muted);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
}

.events-section {
    margin-top: 32px;
}

.events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.event-time {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
    min-width: 120px;
}

.event-desc {
    font-size: 14px;
    color: var(--text);
}

.settings-group {
    margin-bottom: 32px;
}

.settings-hint {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
}

.info-icon {
    width: 24px;
    height: 24px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.info-icon::before {
    content: 'i';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3B82F6;
    font-weight: 600;
    font-size: 14px;
}

.info-text {
    font-size: 14px;
    color: var(--text);
}

.footer {
    background: var(--card);
    border-top: 1px solid var(--stroke);
    padding: 24px 0;
    margin-top: 48px;
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav {
        gap: 16px;
    }

    .nav-link {
        font-size: 12px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .card {
        padding: 20px;
    }

    .section-title {
        font-size: 20px;
    }

    .files-table {
        display: block;
    }

    .files-table thead {
        display: none;
    }

    .files-table tbody,
    .files-table tr,
    .files-table td {
        display: block;
    }

    .files-table tr {
        margin-bottom: 16px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--stroke);
        border-radius: 8px;
    }

    .files-table td {
        padding: 8px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .files-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}