/* Modern Professional Screen Recorder CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --info: #8b5cf6;
    --info-hover: #7c3aed;
    
    /* Neutrals */
    --background: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    
    /* Elevations/Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Other Variables */
    --radius: 0.5rem;
    --radius-full: 9999px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

.container {
    max-width: 1080px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Local Version Download Banner */
.local-version-banner {
    background-color: rgba(17, 94, 201, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-hover);
    box-shadow: var(--shadow);
    animation: gentle-pulse 5s ease-in-out infinite;
}

.local-version-banner p {
    margin: 0;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.local-version-banner p:last-of-type {
    margin-bottom: 1rem;
}

.local-version-banner i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.download-btn:active {
    transform: translateY(0);
}

@keyframes gentle-pulse {
    0%, 100% { background-color: rgba(17, 94, 201, 0.1); }
    50% { background-color: rgba(17, 94, 201, 0.2); }
}

.logo {
    height: 75px;
    width: 75px;
    margin-right: 1rem;
    animation: logoPulse 3s infinite ease-in-out;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary);
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Removed the blue line under logo */

/* Preview container */
.preview-container {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    background-color: #000;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
    aspect-ratio: 16 / 9;
}

.preview-container:hover {
    box-shadow: var(--shadow-md);
}

#preview {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #1a1a1a;
    object-fit: cover;
}

.recording-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    animation: pulse 1.5s infinite;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recording-indicator::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    animation: blink 1s infinite;
}

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

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    min-width: 140px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    background-color: #e5e7eb;
    color: white; /* Changed from #9ca3af to white */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
}

.danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
}

.info {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-hover) 100%);
}

.warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-hover) 100%);
}

/* Settings */
.settings {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background-color: rgba(243, 244, 246, 0.6);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* System Audio Notice */
.system-audio-notice {
    width: 100%;
    background-color: rgba(96, 165, 250, 0.15);
    border-left: 4px solid var(--info);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.system-audio-notice p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.system-audio-notice p.audio-instruction {
    font-size: 0.85rem;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px dashed var(--info);
}

.dialog-example {
    margin-top: 0.75rem;
    text-align: center;
}

.audio-dialog-img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.setting-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.setting-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-left: 1.5rem;
    font-style: italic;
    max-width: 220px;
    line-height: 1.3;
}

select, input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: white;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Status box */
.status-box {
    background: linear-gradient(to bottom, white, #f9fafb);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

#status {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

#recordingTime {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--danger);
    font-family: 'Inter', monospace;
    background-color: #fef2f2;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    letter-spacing: 0.05em;
    border: 1px solid #fee2e2;
}

.hidden {
    display: none;
}

/* Social Share Options */
.share-options {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.share-options h3 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    min-width: 140px;
    box-shadow: var(--shadow-sm);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn:active {
    transform: translateY(0);
}

.facebook {
    background: linear-gradient(135deg, #3b5998, #304d8a);
}

.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8ecf);
}

.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

/* Other Projects Section */
.other-projects {
    background-color: #f8f9fa;
    padding: 30px;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

.other-projects h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-link {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 45%;
    min-width: 280px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.project-link i {
    font-size: 2rem;
    margin-right: 15px;
    color: #3498db;
}

.project-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.project-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    background-color: rgba(249, 250, 251, 0.8);
}

footer p {
    max-width: 1080px;
    margin: 0 auto;
}

/* Toggle Switch for Audio and URL Blur */
.toggle-container {
    display: inline-block;
    position: relative;
    width: 54px;
    height: 28px;
}

.toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: var(--success);
}

.toggle-checkbox:checked + .toggle-label:before {
    transform: translateX(26px);
}

/* Privacy Mode Effect */
.address-bar-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px; /* Typical height of a browser address bar */
    background-color: rgb(79, 70, 229); /* Completely opaque overlay with primary color */
    /* Removed blur effects since we want complete hiding, not just blurring */
    z-index: 10;
    border-bottom: 1px solid var(--primary);
    display: none; /* Hide by default, use .hidden class to toggle */
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

/* When not hidden, make it flex to show properly */
.address-bar-blur:not(.hidden) {
    display: flex;
}

/* Webcam Picture-in-Picture */
.webcam-pip {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 180px;
    height: 135px; /* 16:9 aspect ratio for the PiP */
    border-radius: 8px;
    border: 2px solid var(--primary);
    background-color: #000;
    box-shadow: var(--shadow-md);
    z-index: 9;
    object-fit: cover;
    transition: all 0.3s ease;
}

.webcam-pip:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .settings {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .setting-group {
        width: 100%;
        justify-content: space-between;
    }
    
    #recordingTime {
        font-size: 1.25rem;
    }
    
    footer {
        margin-top: 1rem;
        padding: 0.75rem 0;
    }
}
/* Web Version Info Banner */
.web-version-info-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    border: none;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeInDown 0.6s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.web-version-info-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}

.web-version-info-banner p {
    margin-bottom: 0.8rem;
    color: white;
    font-size: 1.05rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.web-version-info-banner p:last-child {
    margin-bottom: 0;
}

.web-version-info-banner strong {
    color: white;
    font-weight: 700;
}

/* Donation Container Styles */
.donation-container {
    margin-bottom: 2rem;
}

.donation-message {
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #add8e6 0%, #87ceeb 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    color: #0d3b66;
    box-shadow: var(--shadow);
    animation: gentle-highlight 4s infinite alternate;
}

@keyframes gentle-highlight {
    0% { box-shadow: var(--shadow); }
    100% { box-shadow: 0 0 15px rgba(135, 206, 235, 0.6); }
}

.donation-message h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.donation-message p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 80%;
    margin: 0 auto;
}

.recording-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.donation-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    width: 180px;
}

.donation-qr:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.donation-qr img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.donation-qr img:hover {
    transform: scale(1.05);
}

.donation-qr p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* QR Code Modal Styles */
.qr-code-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.qr-code-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

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

.qr-code-close {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.qr-code-close:hover {
    color: var(--primary);
}

#expandedQRCode {
    width: 80%;
    max-width: 300px;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
    border: 2px solid var(--primary);
}

#qrCodeCaption {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 15px;
}

/* Responsive adjustments for donation section */
@media (max-width: 768px) {
    .recording-section {
        flex-direction: column;
        align-items: center;
    }
    
    .donation-qr {
        width: 140px;
        margin-bottom: 1rem;
    }
    
    .donation-qr.right {
        margin-top: 1rem;
    }
    
    .donation-message p {
        max-width: 100%;
    }
}

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