/* Global Styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

/* Tool Container */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

/* Upload Section */
.upload-section {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.file-input-wrapper {
    position: relative;
    background-color: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input-wrapper:hover,
.file-input-wrapper.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Video Player */
.video-container {
    background-color: #000;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

video {
    width: 100%;
    height: 100%;
    max-height: 70vh;
}

.video-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

/* Controls Panel */
.controls-panel {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.panel-section {
    margin-bottom: 2rem;
}

.panel-section:last-child {
    margin-bottom: 0;
}

h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.shift-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.btn-shift {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

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

.manual-adjust {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

input[type="number"] {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    width: 100%;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Status & Info */
.offset-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.offset-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.offset-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-feature-settings: "tnum";
}

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

.instructions kbd {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    font-family: monospace;
    font-size: 0.8rem;
}

/* Navigation */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-color);
}

/* Info Section (SEO Content) */
.info-section {
    margin-top: 4rem;
    display: grid;
    gap: 2rem;
}

.content-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.content-card h2 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.steps-list {
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.steps-list li {
    margin-bottom: 1rem;
}

.steps-list strong {
    color: var(--text-color);
}

.steps-list ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.badge {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.85em;
    font-weight: 500;
}

code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    font-family: monospace;
    color: #fca5a5;
}

.content-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-card strong {
    color: var(--text-color);
    font-weight: 600;
}