/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 0;
}

/* Header Section */
.header {
    text-align: center;
    padding-top: 48px;
    margin-bottom: 0;
}

.main-title {
    font-size: 3.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.main-subtitle {
    font-size: 1.125rem;
    color: #9ca3af;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Recording Modes Section */
.recording-modes {
    width: 100%;
    max-width: 1000px;
}

.section-title {
    display: none;
}

.hero-section {
    padding: 16px 0 8px;
}

.hero-title {
    margin-bottom: 4px;
}

.hero-subtitle {
    margin-bottom: 12px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-900px) {
    .modes-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* Wrapper box around mode cards */
.modes-box {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 20px;
    padding: 32px 24px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    margin-top: 0;
}

.mode-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-card:hover {
    transform: translateY(-4px);
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 20px 40px rgba(59,130,246,0.3);
}

.mode-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(71, 85, 105, 0.2);
    border-radius: 20px;
    color: #94a3b8;
}

.mode-icon svg {
    width: 48px;
    height: 48px;
}

.mode-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.mode-description {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

.mode-link {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.mode-link:hover {
    color: #60a5fa;
}

/* Audio Section */
.audio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    padding: 16px 24px;
}

.audio-label {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}

.toggle-container {
    position: relative;
}

.toggle-switch {
    display: block;
    width: 48px;
    height: 24px;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked + .toggle-switch {
    background: #22c55e;
}

input[type="checkbox"]:checked + .toggle-switch .toggle-slider {
    transform: translateX(24px);
}

.audio-description {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .main-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .modes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mode-card {
        padding: 30px 20px;
    }
    
    .mode-icon {
        width: 60px;
        height: 60px;
    }
    
    .mode-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .modes-box {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .main-content {
        padding: 40px 0;
    }
    
    .header {
        margin-bottom: 60px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .mode-card {
        padding: 24px 16px;
    }
    
    .audio-toggle {
        padding: 12px 16px;
    }
}

/* Preview Page Styles - New Design */
.preview-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
}

.preview-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.preview-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.back-button {
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(15, 23, 42, 1);
    border-color: rgba(100, 116, 139, 0.6);
}

.preview-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Left Column - Screen Preview */
.preview-left {
    min-width: 0;
}

.screen-preview-section {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 16px;
    padding: 24px;
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.screen-icon {
    color: #94a3b8;
}

.screen-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
}

.preview-badge {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.video-preview-container {
    position: relative;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 16/9;
}

#preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

/* Thêm nhãn overlay cho video preview */
.video-preview-container .video-badge {
    display: none;
    position: absolute;
    top: 16px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
}
.video-preview-container .video-badge.screen {
    left: 16px;
    background: #3b82f6;
}
.video-preview-container .video-badge.camera {
    left: 96px;
    background: #10b981;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.live-dot {
    color: #10b981;
    font-size: 0.875rem;
}

.live-text {
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 500;
}

.start-recording-btn {
    /* Gradient nền rực rỡ */
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 35%, #fb923c 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45), 0 0 12px rgba(253, 164, 40, 0.4);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-width: 240px;
    padding: 16px 28px;
    font-size: 1rem;
    margin: 32px auto 0;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.start-recording-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.start-recording-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.55), 0 0 20px rgba(253, 164, 40, 0.5);
}

.start-recording-btn:hover::before {
    left: 200%;
}

/* Duration Display */
.duration-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
}

.duration-icon {
    font-size: 0.875rem;
    color: #94a3b8;
}

.duration-time {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

/* Recording Controls */
.recording-controls {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.pause-btn, .stop-btn {
    flex: 1;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pause-btn {
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
    box-shadow: none;
}

.pause-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.pause-btn.paused {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    border: none;
    color: #ffffff;
}

.pause-btn.paused:hover {
    background: linear-gradient(135deg, #32d583 0%, #22c55e 100%);
}

.stop-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.stop-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.pause-icon, .stop-icon {
    font-size: 0.7rem;
}

.record-dot {
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Right Column - Recording Status */
.preview-right {
    min-width: 0;
}

.recording-status-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 16px;
    padding: 24px;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 24px;
}

.status-group {
    margin-bottom: 24px;
}

.status-group:last-child {
    margin-bottom: 0;
}

.status-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

.mode-pill {
    background: #475569;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pill.ready {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-pill.recording {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-icon {
    font-size: 0.75rem;
}

.permissions-grid {
    display: grid;
    gap: 12px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
}

.permission-item.granted {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
}

.permission-check {
    font-size: 0.875rem;
    font-weight: 600;
}

.permission-item.granted .permission-check {
    color: #10b981;
}

.permission-item:not(.granted) .permission-check {
    color: #6b7280;
}

.permission-text {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .preview-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .preview-container {
        padding: 0 16px;
    }
    
    .preview-header {
        padding: 24px 0;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .preview-title {
        font-size: 1.5rem;
    }
    
    .screen-preview-section,
    .recording-status-panel {
        padding: 20px;
    }
    
    .start-recording-btn {
        width: 100%;
    }
    
    .recording-controls {
        gap: 6px;
    }
    
    .pause-btn, .stop-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .duration-time {
        font-size: 1rem;
    }
}

/* Picture-in-Picture webcam */
.pip-video {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 200px;
    height: 112px;
    border: 2px solid #10b981;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    object-fit: cover;
    cursor: move;
    background: #000;
    transition: box-shadow 0.2s;
}

.pip-video:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

@media (max-width: 768px) {
    .pip-video {
        width: 140px;
        height: 79px;
        bottom: 12px;
        right: 12px;
    }
}

/* Save Section Styles */
.save-section {
    margin-top: 32px;
}

.save-section .save-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.save-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.save-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.save-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.save-card .card-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    flex: 1;
}

.download-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.download-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.download-btn .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.save-drive-btn {
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer */
.site-footer {
    background: none;
    padding: 40px 0 20px;
}
/* Căn giữa text trong footer */
.site-footer .container {
    text-align: center;
}
/* Chỉ hiện copyright, font nhẹ */
.footer-copy {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    margin: 0;
}
/* Ẩn các style cũ nếu có */
.footer-nav {
    display: none;
}

/* Footer Author Highlight */
.footer-copy a {
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    margin: 0 4px;
    transition: color 0.2s ease;
}
.footer-copy a:hover {
    color: #60a5fa;
} 