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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    background: #1c1c1e;
    height: 100vh;
    overflow: hidden;
    color: white;
}

.container {
    display: flex;
    height: 100vh;
}

/* Left Panel - Controls */
.controls-panel {
    width: 320px;
    background: #2c2c2e;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #48484a;
}

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

.controls-panel h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
    color: #ffffff;
}

.nav-link {
    font-size: 13px;
    color: #007aff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.7;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #ffffff;
}

.control-group input,
.control-group textarea,
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #48484a;
    border-radius: 8px;
    font-size: 14px;
    background: #1c1c1e;
    color: white;
    margin-bottom: 8px;
    font-family: inherit;
}

.control-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.control-group textarea {
    resize: none;
    line-height: 1.4;
}

.control-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.control-group input:focus,
.control-group textarea:focus,
.control-group select:focus {
    outline: none;
    border-color: #007aff;
}

.icon-preview {
    margin-top: 10px;
    width: 60px;
    height: 60px;
    border-radius: 13.33px;
    background: #f5f5f7;
    display: none;
    background-size: cover;
    background-position: center;
}

.icon-preview.visible {
    display: block;
}

.export-btn {
    width: 100%;
    padding: 15px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.export-btn:hover {
    background: #0051d5;
    transform: translateY(-1px);
}

.export-btn:disabled {
    background: #48484a;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    display: inline-block;
    font-size: 18px;
    transition: transform 0.3s;
}

.btn-icon.spinning {
    animation: spin 1s linear infinite;
}

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

.config-btn {
    width: 100%;
    padding: 10px 16px;
    background: #3a3a3c;
    color: #ffffff;
    border: 1px solid #48484a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.config-btn:hover {
    background: #48484a;
    transform: translateY(-1px);
}

.export-progress {
    margin-top: 15px;
}

.export-progress.hidden {
    display: none;
}

.progress-text {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 8px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #3a3a3c;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007aff, #0051d5);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-percentage {
    font-size: 12px;
    color: #98989f;
    text-align: center;
    margin-top: 4px;
}

/* Rate Limit Info */
.rate-limit-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: #2a2a2c;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #98989f;
    border: 1px solid #3a3a3c;
}

.rate-limit-info.hidden {
    display: none;
}

.rate-limit-reset {
    font-size: 11px;
    color: #98989f;
}

.rate-limit-reset.hidden {
    display: none;
}

/* Admin Section */
/* Right Panel - Video Preview */
.preview-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.video-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    background: black;
    border-radius: 20px;
    overflow: visible;
}

#previewVideo {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
}

/* iOS Notification Styles */
.notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    pointer-events: none;
}

.notification.hidden {
    display: none;
}

/* iOS 18 Notification */
.notification.ios18 {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.ios18 .app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #007aff;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.notification.ios18 .notification-content {
    flex: 1;
    min-width: 0;
}

.notification.ios18 .app-name {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.08px;
    margin-bottom: 2px;
}

.notification.ios18 .notification-time {
    font-size: 12px;
    color: #86868b;
    font-weight: 400;
    align-self: flex-start;
    padding-top: 1px;
}

.notification.ios18 .notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1px;
    letter-spacing: -0.15px;
}

.notification.ios18 .notification-text {
    font-size: 14px;
    color: #1d1d1f;
    line-height: 1.3;
    letter-spacing: -0.15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* iOS 26 Notification - More opaque with blur (Matching real iOS) */
.notification.ios26 {
    border-radius: 24px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 2px 2px 4px rgba(0, 0, 0, 0.08);
}

/* Liquid glass highlight layer with inset bevels */
.notification.ios26::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 28px;
    /* backdrop-filter: blur(1px); */
    /* box-shadow: inset -10px -8px 0px -11px rgba(255, 255, 255, 1), inset 0px -9px 0px -8px rgba(255, 255, 255, 1); */
    opacity: 0.6;
    z-index: -1;
    filter: blur(1px) drop-shadow(10px 4px 6px black) brightness(115%);
    pointer-events: none;
}

.notification.ios26 .app-icon {
    width: 44px;
    height: 44px;
    border-radius: 11.5px;
    background: #007aff;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.notification.ios26 .notification-content {
    flex: 1;
    min-width: 0;
}

.notification.ios26 .app-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(30, 30, 30, 0.9);
    letter-spacing: -0.08px;
    margin-bottom: 2px;
}

.notification.ios26 .notification-time {
    font-size: 12px;
    color: rgba(100, 100, 100, 0.8);
    font-weight: 400;
    align-self: flex-start;
    padding-top: 1px;
}

.notification.ios26 .notification-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(20, 20, 20, 1);
    margin-bottom: 1px;
    letter-spacing: -0.15px;
}

.notification.ios26 .notification-text {
    font-size: 14px;
    color: rgba(30, 30, 30, 0.95);
    line-height: 1.4;
    letter-spacing: -0.12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Animation keyframes */
@keyframes notificationSlideIn {
    0% {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
}

.notification.show {
    animation: notificationSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.notification.hide {
    animation: notificationSlideOut 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}
