 /* ===== reset & base ===== */
 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     background: #f6f9fc;
     font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
     color: #1e293b;
     line-height: 1.5;
     padding: 0;
 }

 .container {
     max-width: 1280px;
     margin: 0 auto;
     padding: 2rem 1.5rem;
 }

 .displaynone {
     display: none !important;
 }

 /* ===== MENU BAR ===== */
 .menu-bar {
     background: white;
     border-bottom: 1px solid #e2e8f0;
     padding: 0 1.5rem;
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     justify-content: space-between;
     height: 64px;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
     position: sticky;
     top: 0;
     z-index: 1000;
 }

 .menu-bar .logo {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     font-weight: 600;
     font-size: 1.4rem;
     letter-spacing: -0.02em;
     color: #0f172a;
     text-decoration: none;
     cursor: default;
 }

 .menu-bar .logo img {
     color: #3b82f6;
     width: 50px;
     margin: 3px 5px 3px 15px;
 }

 .menu-bar .logo i {
     color: #3b82f6;
     font-size: 1.6rem;
 }

 .menu-bar .logo span {
     background: linear-gradient(135deg, #2563eb, #7c3aed);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 .menu-bar .nav-links {
     display: flex;
     gap: 0.2rem;
     align-items: center;
     font-weight: 500;
     font-size: 0.95rem;
 }

 .menu-bar .nav-links .dropdown {
     position: relative;
     display: inline-block;
     padding-bottom: 8px;
     margin-bottom: -8px;
 }

 .menu-bar .nav-links .dropdown>a {
     display: inline-block;
     padding: 0.4rem 1rem;
     color: #475569;
     text-decoration: none;
     border-radius: 8px;
     transition: background 0.15s, color 0.15s;
     cursor: default;
 }

 .menu-bar .nav-links .dropdown>a:hover {
     background: #f1f5f9;
     color: #1e293b;
 }

 .menu-bar .nav-links .dropdown>a i {
     font-size: 0.7rem;
     margin-left: 0.2rem;
     color: #94a3b8;
 }

 .menu-bar .nav-links .dropdown .dropdown-menu {
     visibility: hidden;
     opacity: 0;
     position: absolute;
     top: calc(100% - 4px);
     left: 0;
     background: white;
     min-width: 190px;
     border-radius: 12px;
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
     border: 1px solid #edf2f7;
     padding: 0.4rem 0;
     padding-top: 8px;
     margin-top: -4px;
     transition: opacity 0.15s ease, visibility 0.15s ease;
 }

 .menu-bar .nav-links .dropdown:hover .dropdown-menu {
     visibility: visible;
     opacity: 1;
 }

 .menu-bar .nav-links .dropdown .dropdown-menu a {
     display: block;
     padding: 0.5rem 1.2rem;
     color: #475569;
     text-decoration: none;
     font-weight: 400;
     font-size: 0.9rem;
     transition: background 0.1s;
     cursor: default;
 }

 .menu-bar .nav-links .dropdown .dropdown-menu a:hover {
     background: #f1f5f9;
     color: #1e293b;
 }

 .menu-bar .nav-links .dropdown .dropdown-menu .divider {
     height: 1px;
     background: #edf2f7;
     margin: 0.2rem 0.8rem;
 }

 .menu-bar .nav-links .btn-outline-sm {
     background: transparent;
     border: 1px solid #e2e8f0;
     padding: 0.3rem 1rem;
     border-radius: 40px;
     font-weight: 500;
     font-size: 0.85rem;
     color: #1e293b;
     display: inline-flex;
     align-items: center;
     gap: 0.4rem;
     background: white;
     cursor: default;
     margin-left: 0.5rem;
 }

 .menu-bar .nav-links .btn-outline-sm i {
     color: #64748b;
 }

 /* ===== ad container ===== */
 .ad-container {
     background: #f1f5f9;
     border-radius: 20px;
     padding: 0.75rem 1rem;
     margin: 1.2rem 0 1.8rem 0;
     display: flex;
     align-items: center;
     justify-content: center;
     border: 1px dashed #cbd5e1;
     color: #475569;
     font-size: 0.85rem;
     text-align: center;
     min-height: 90px;
     flex-wrap: wrap;
     gap: 0.5rem 1rem;
     display: none !important;
 }

 .ad-container .ad-label {
     background: #e2e8f0;
     padding: 0.2rem 0.7rem;
     border-radius: 40px;
     font-size: 0.65rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.04em;
     color: #64748b;
 }

 .google-ad-placeholder {
     background: #f1f5f9;
     border-radius: 16px;
     padding: 0.6rem 1rem;
     text-align: center;
     font-size: 0.8rem;
     color: #64748b;
     border: 1px dashed #cbd5e1;
     min-height: 70px;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.5rem;
     flex-wrap: wrap;
     width: 100%;
 }

 .google-ad-placeholder i {
     color: #3b82f6;
     font-size: 1.2rem;
 }

 .google-ad-placeholder .ad-unit-label {
     background: #e2e8f0;
     padding: 0.15rem 0.6rem;
     border-radius: 40px;
     font-size: 0.6rem;
     font-weight: 600;
     letter-spacing: 0.03em;
     color: #475569;
 }

 /* ===== breadcrumb ===== */
 .breadcrumb {
     display: flex;
     align-items: center;
     gap: 0.4rem;
     font-size: 0.9rem;
     color: #64748b;
     margin-bottom: 1.2rem;
     flex-wrap: wrap;
 }

 .breadcrumb a {
     color: #2563eb;
     text-decoration: none;
     cursor: default;
 }

 .breadcrumb a:hover {
     text-decoration: underline;
 }

 .breadcrumb .separator {
     color: #94a3b8;
 }

 .breadcrumb .current {
     color: #1e293b;
     font-weight: 500;
 }

 /* buttons */
 .btn-upload {
     background: #1e293b;
     color: white;
     border: none;
     padding: 0.8rem;
     width: 165px;
     border-radius: 60px;
     font-weight: 500;
     font-size: 0.95rem;
     cursor: pointer;
     display: inline-flex;
     justify-content: center;
     gap: 0.5rem;
     transition: 0.15s;
 }

 .btn-upload:hover {
     background: #0f172a;
 }

 .btn-upload i {
     color: #94a3b8;
 }

 .btn-output {
     background: #db2777;
     color: white;
     border: none;
     padding: 0.8rem;
     margin: 0 1.2rem;
     border-radius: 60px;
     font-weight: 600;
     font-size: 1rem;
     cursor: pointer;
     display: inline-flex;
     justify-content: center;
     gap: 0.6rem;
     transition: 0.15s;
     width: 165px;
 }

 .btn-output:hover {
     background: #be185d;
 }

 .btn-output:disabled {
     opacity: 0.5;
     cursor: not-allowed;
 }

 .btn-output i {
     color: #fbcfe8;
 }

 .action-row {
     display: flex;
     flex-wrap: wrap;
     gap: 0.6rem;
     justify-content: center;
 }

 /* ===== Favorite button states ===== */
.btn-outline-sm .fa-star {
    transition: color 0.2s, transform 0.2s;
}

.btn-outline-sm .fa-star.active {
    color: #f59e0b;
    transform: scale(1.1);
}

.btn-outline-sm .fa-star.filled {
    color: #f59e0b;
}

.btn-outline-sm .fa-star:not(.active):hover {
    transform: scale(1.2);
}

/* Toast notification */
.favorite-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
}

.favorite-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.favorite-toast i {
    font-size: 1.1rem;
}

.favorite-toast .toast-icon-success {
    color: #22c55e;
}

.favorite-toast .toast-icon-error {
    color: #ef4444;
}

.favorite-toast .toast-icon-info {
    color: #3b82f6;
}