:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --accent: #facc15;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.05);
}

body {
    background-color: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    margin: 0;
}

/* Header Styling */
.panel-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.panel-header-wrapper{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.email-text { font-weight: 600; display: block; }
.plan-badge { 
    font-size: 0.75rem; 
    color: var(--primary); 
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.limits-card {
    display: flex;
    justify-content: center;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 30px;
    gap: 15px;
    align-items: center;
}

.limit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.limit-item .material-symbols-rounded { font-size: 18px; color: var(--primary); }
.limit-divider { width: 1px; height: 16px; background: #cbd5e1; }

.header-actions { display: flex; gap: 10px; }

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.secondary-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 20px;
}

.upload-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.8);
    transition: transform 0.3s ease;
}

.section-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-icon { background: #fef2f2; color: #dc2626; }

.upload-section h2 { font-size: 1.25rem; margin: 0; }
.upload-section p { color: var(--text-muted); font-size: 0.9rem; margin: 4px 0 0; }

/* Drag & Drop Zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 1.5rem;
    position: relative;
    transition: 0.2s;
    background: #fafafa;
}

.drop-zone:hover { border-color: var(--primary); background: #f5f7ff; }

.drop-zone .material-symbols-rounded {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.action-btn {
    width: 100%;
    background: var(--text-main);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.action-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Info Section */
.full-width { grid-column: span 2; }
.info-section {
    background: linear-gradient(90deg, #1e293b, #334155);
    color: white;
    padding: 1.5rem 2rem;
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
}

.info-content { display: flex; align-items: center; gap: 1.5rem; }
.info-content .material-symbols-rounded { font-size: 32px; color: var(--accent); }
.info-content h3 { margin: 0 0 5px; font-size: 1.1rem; }
.info-content p { margin: 0; opacity: 0.8; font-size: 0.9rem; }

/* MODAL RE-DESIGN */
.modal {
    display: none;
    position: fixed;
    background: rgb(3 3 3 / 80%);
    backdrop-filter: blur(8px);
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    left: 0;
    top: 0;
    z-index: 105;
}

.results-container{
    padding-top: 20px;
}

.premium-modal {
    position: relative;
    overflow: hidden;
    background: white;
    padding: 0;
    max-width: 400px;
    height: 410px;
    border-radius: 24px;
}

.modal-glow {
    position: absolute;
    top: -50px; left: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(255,255,255,0) 70%);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border: none;
    flex-direction: column;
}

.limit-icon-container {
    width: 64px;
    height: 64px;
    background: #fff7ed;
    color: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.limit-icon-container .material-symbols-rounded { font-size: 32px; }

.modal-body { padding: 0 2rem; text-align: center; }
.modal-body h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.modal-body p { color: var(--text-muted); line-height: 1.5; }

.modal-footer {
    padding: 2rem;
    flex-direction: column;
    gap: 10px;
}

/* Прелоадер повністю на весь екран */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.95); /* світлий фон */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Кружечки-анімація */
.loader {
  display: flex;
  gap: 0.5rem;
}

.loader div {
  width: 15px;
  height: 15px;
  background: #4f46e5; /* фіолетовий колір, можеш змінити */
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.loader div:nth-child(2) { animation-delay: 0.2s; }
.loader div:nth-child(3) { animation-delay: 0.4s; }
.loader div:nth-child(4) { animation-delay: 0.6s; }

@keyframes bounce {
  to {
    transform: translateY(-20px);
    opacity: 0.6;
  }
}


.btn-upgrade {
    background: var(--primary);
    border: none;
    padding: 16px;
    font-size: 1rem;
    margin: 0 auto;
    display: block;
    width: 150px;
    color: #fff;
    text-align: center;
    border-radius: 10px;
}

.btn-later {
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px;
}

.btn-later:hover { background: transparent; color: var(--text-main); }

.close-btn {
    position: absolute;
    top: 15px; right: 15px;
    background: #f1f5f9;
    color: var(--text-muted);
    border: none;
}

/* Адаптивність */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .header-center { display: none; }
}







/* Додаткові стилі для бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Анімація бургера в "X" при відкритті */
.burger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.header-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-grow: 1;
    justify-content: right;
}

/* Адаптивність */
@media (max-width: 768px) {
    
    .burger-menu {
        display: flex;
    }

    .header-nav-wrapper {
        position: fixed;
        top: -100%; /* Ховаємо меню зверху */
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        padding: 80px 20px 30px;
        box-shadow: var(--shadow-md);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 90;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .header-nav-wrapper.active {
        top: 0;
    }

    .header-center, .header-actions {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        flex-direction: column;
        gap: 10px;
    }

    .header-actions button, .header-actions a {
        width: 100%;
    }

    .limits-card {
        width: 100%;
        justify-content: center;
    }

    .dashboard-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
}