/* ===== VARIABLES ===== */
:root {
    --primary: #ff0000;
    --primary-dark: #cc0000;
    --primary-light: #ff4444;
    --dark: #111111;
    --dark-nav: #1a1a1a;
    --text: #1a1a1a;
    --text-muted: #606060;
    --bg: #f9f9f9;
    --card-bg: #ffffff;
    --border: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --shadow-red: 0 4px 20px rgba(255,0,0,0.25);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,0,0,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(255,0,0,0); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
@keyframes spin-in {
    from { opacity: 0; transform: rotate(-10deg) scale(0.8); }
    to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

.animate-fade-up   { animation: fadeInUp 0.6s ease both; }
.animate-fade-in   { animation: fadeIn 0.5s ease both; }
.animate-slide-left{ animation: slideInLeft 0.6s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
}
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }

/* ===== NAVBAR ===== */
.site-navbar {
    background: var(--dark-nav) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}
.site-navbar .navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-navbar .navbar-brand .brand-icon {
    background: var(--primary);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.site-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}
.site-navbar .nav-link.btn-nav-cta {
    background: var(--primary);
    color: #fff !important;
    padding: 0.4rem 1rem !important;
    margin-left: 0.5rem;
}
.site-navbar .nav-link.btn-nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-red);
}
.navbar-toggler { border-color: rgba(255,255,255,0.3) !important; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== PAGE HERO BANNER ===== */
.page-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 50%, #1a1a1a 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 50%, rgba(255,0,0,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease both;
}
.page-hero p {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
    margin: 0;
    animation: fadeInUp 0.6s 0.1s ease both;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: none;
    padding: 0.6rem 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ===== CARDS ===== */
.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease both;
}
.tool-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.tool-card .card-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-card .card-section-title .step-badge,
.result-card .card-section-title .step-badge {
    background: var(--primary);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== FORM ELEMENTS ===== */
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 0.4rem; }

.form-control {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,0,0,0.1);
    outline: none;
}

input[type="file"].form-control { cursor: pointer; }
input[type="file"].form-control::-webkit-file-upload-button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    transition: var(--transition);
}
input[type="file"].form-control::-webkit-file-upload-button:hover { background: var(--primary-dark); }

/* ===== BUTTONS ===== */
.btn {
    font-family: var(--font);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary-red {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-red);
}
.btn-primary-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,0,0,0.4);
    color: #fff;
}
.btn-primary-red:active { transform: translateY(0); }

.btn-download {
    background: linear-gradient(135deg, #00b300 0%, #007700 100%);
    color: #fff;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(0,150,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,150,0,0.4);
    color: #fff;
}
.btn-download svg { width: 18px; height: 18px; }

.btn-create {
    background: linear-gradient(135deg, #ff6b00 0%, #ff0000 100%);
    color: #fff;
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(255,70,0,0.35);
    animation: bounce-subtle 2s ease infinite;
}
.btn-create:hover {
    transform: translateY(-2px) scale(1.01);
    color: #fff;
    animation: none;
    box-shadow: 0 6px 24px rgba(255,70,0,0.5);
}

/* ===== PLAY ICON SELECTOR ===== */
.icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0.5rem 0;
}
.playicon, .icon-option {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: #f5f5f5;
    padding: 4px;
}
.playicon:hover, .icon-option:hover {
    border-color: var(--primary);
    transform: scale(1.12);
    box-shadow: var(--shadow-red);
    background: #fff;
}
.playicon.imgselect, .icon-option.selected {
    border-color: var(--primary);
    background: #fff;
    box-shadow: var(--shadow-red);
    transform: scale(1.08);
    animation: pulse-border 1.5s ease infinite;
}

/* ===== CANVAS PREVIEW ===== */
.canvas-wrapper {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}
.canvas-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,0,0,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.canvas-wrapper .canvas-title {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
#myCanvas, #previewCanvas {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: fadeIn 0.4s ease both;
}

/* ===== ICON SCALE SLIDER ===== */
.slider-wrapper { display: flex; align-items: center; gap: 12px; }
.slider-wrapper label { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.slider-wrapper .scale-value {
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 44px;
    text-align: center;
}
input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(255,0,0,0.2);
    transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 5px rgba(255,0,0,0.3);
}

/* ===== NEW VERSION BANNER ===== */
.new-version-banner {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffc107;
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    animation: fadeInUp 0.4s ease both;
}
.blinking-icon {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    animation: shimmer 2s linear infinite;
    background-size: 200% auto;
    background-image: linear-gradient(90deg, #ff0000, #ff6b00, #ff0000);
}
.new-item-link {
    font-weight: 600;
    color: var(--primary);
}

/* ===== HOW-TO STEPS ===== */
.how-to-steps { counter-reset: steps; }
.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    animation: fadeInUp 0.5s ease both;
}
.step-item:last-child { border-bottom: none; }
.step-num {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-red);
}
.step-item p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.step-item strong { color: var(--text); }

/* ===== FEATURE LIST ===== */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInUp 0.5s ease both;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ===== SIDEBAR ===== */
.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.6s ease both;
}
.sidebar-card .sidebar-header {
    background: linear-gradient(135deg, var(--dark-nav), #2d0000);
    color: #fff;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card .sidebar-body { padding: 1rem; }
.tool-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 4px;
}
.tool-link-item:hover {
    background: #fff5f5;
    border-color: rgba(255,0,0,0.15);
    color: var(--primary);
    transform: translateX(4px);
}
.tool-link-item .tool-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fff0f0, #ffe0e0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== CONTACT FORM ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) { .contact-wrapper { grid-template-columns: 1fr; } }

.contact-info-card {
    background: linear-gradient(135deg, var(--dark-nav), #1e0000);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: slideInLeft 0.6s ease both;
}
.contact-info-card h3 { margin-bottom: 1.5rem; }
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-item .ci-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,0,0,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-form-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    animation: fadeInUp 0.6s 0.1s ease both;
}
.alert-success-custom {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #28a745;
    color: #155724;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: fadeInUp 0.4s ease both;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark-nav);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.site-footer h5 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.site-footer a {
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
    transition: var(--transition);
}
.site-footer a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.25rem;
    margin-top: 2rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); display: inline; padding: 0; }
.footer-bottom a:hover { color: var(--primary); padding-left: 0; }

/* ===== SECTION HEADINGS ===== */
.section-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 14px;
}
.section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--primary);
    border-radius: 2px;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease both;
}
.content-section h2 { font-size: 1.2rem; color: var(--text); }
.content-section h4 { font-size: 1rem; color: var(--text); margin-top: 1.25rem; }
.content-section p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.content-section ul  { padding-left: 0; list-style: none; }
.content-section ul li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    line-height: 1.6;
}
.content-section ul li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.6rem;
    top: 0.65rem;
}

/* ===== RESULT PREVIEW CARD ===== */
.result-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s 0.2s ease both;
}
.result-card-header {
    background: linear-gradient(135deg, var(--dark-nav), #1e0000);
    color: #fff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.result-card-body { padding: 1.5rem; }

/* ===== PRIVACY PAGE ===== */
.privacy-content h2 { font-size: 1.15rem; color: var(--text); margin-top: 1.5rem; }
.privacy-content p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }

/* ===== SCROLL REVEAL (JS adds class) ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== ADSENSE ===== */
.ad-wrapper { margin: 1rem 0; min-height: 50px; }

/* ===== TOOLS DROPDOWN ===== */
.tools-dd-single {
    min-width: 220px;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
}
.tools-dd-item {
    display: block;
    padding: 5px 10px;
    font-size: .82rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.tools-dd-item:hover {
    background: #fff0f0;
    color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-hero { padding: 1.5rem 0 1.25rem; }
    .tool-card, .content-section, .result-card-body { padding: 1.25rem; }
    .icon-grid { gap: 8px; }
    .playicon, .icon-option { width: 46px; height: 46px; }
    .site-footer { padding: 2rem 0 1rem; }
}
