:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --success-hover: #059669;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(239, 68, 68, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header {
    margin-bottom: 30px;
}

h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

p.subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

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

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

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

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.success-btn {
    background: var(--success);
    color: white;
    width: 100%;
    margin-bottom: 10px;
}

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

.outline-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 100%;
}

.outline-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
}

input[type="text"], input[type="number"] {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

.file-name {
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary);
    word-break: break-all;
}

.video-container {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

video {
    width: 100%;
    max-height: 300px;
    display: block;
    transition: max-height 0.4s ease;
}

video.large-view {
    max-height: 600px;
}

.time-settings {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.input-field {
    flex: 1;
    text-align: left;
}

.input-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.time-pin-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.time-pin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.time-pin-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.status-badge {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    height: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.action-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.action-btn.record {
    background: var(--danger);
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

.action-btn.record:hover:not(:disabled) {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

.action-btn.record.recording {
    animation: pulse 1.5s infinite;
}

.action-btn.pause {
    background: #f59e0b;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
}

.action-btn.pause:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
}

.action-btn.pause.resumed {
    background: #10b981;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

.action-btn.pause.resumed:hover:not(:disabled) {
    background: #059669;
}

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

.action-btn.stop:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.action-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 24px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
