/* ===== Material Symbols ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Template Design Utilities ===== */
.gradient-bg {
    background: linear-gradient(135deg, #000000, #0f172a, #581c87);
}

.gradient-text {
    background: linear-gradient(to right, #ff00ff, #8a2be2, #00bfff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.headline-bg {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===== Hero Section Title Override ===== */
h1.gradient-text.headline-bg {
    text-shadow: none;
}

/* ===== Section Cards (match template bg-gray-50 card style) ===== */
.tool-card,
.bg-surface-container-low {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.tool-card:hover,
.bg-surface-container-low.glow-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(138, 43, 226, 0.3);
}

/* ===== Glow Effects (purple accent) ===== */
.glow-box {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

/* ===== FAQ Accordion ===== */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 16px 20px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(138, 43, 226, 0.3);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-item .faq-icon {
    color: #8b5cf6 !important;
}

/* ===== Collapsible Navigation ===== */
.collapse-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapse-nav.open {
    max-height: 2000px;
}

.collapse-trigger {
    cursor: pointer;
    user-select: none;
}

.collapse-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapse-arrow.open {
    transform: rotate(180deg);
}

/* ===== Mobile Nav ===== */
.mobile-nav {
    background: #fff;
    border-color: #e5e7eb;
}

/* ===== Mobile Header ===== */
.header-bar {
    height: 64px;
}

.mobile-nav .border-t { border-color: #e5e7eb; }

.hamburger-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.hamburger-spacer {
    visibility: hidden;
}

@media (min-width: 768px) {
    .hamburger-btn {
        display: none;
    }

    .hamburger-spacer {
        display: none;
    }
}

/* ===== Mode Tabs ===== */
#modeTabs {
    display: flex;
    flex-wrap: wrap;
}

.mode-tab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 10px 22px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #f9fafb;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-tab:hover {
    border-color: #8b5cf6;
    color: #374151;
}

.mode-tab.active {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    border-color: #7c3aed;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.mode-tab .material-symbols-outlined {
    font-size: 18px;
}

/* ===== Canvas Preview ===== */
.canvas-preview {
    width: 100%;
    max-height: 640px;
    margin: 0 auto;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: #f9fafb;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.08), 0 4px 24px rgba(0, 0, 0, 0.06);
}

.canvas-preview canvas {
    display: block;
}

@media (max-width: 640px) {
    .canvas-preview {
        max-width: 90vw;
    }
}

/* ===== Controls Row ===== */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.knob-container canvas {
    cursor: grab;
    border-radius: 50%;
    touch-action: none;
    transition: box-shadow 0.2s ease;
}

.knob-container canvas:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.knob-container canvas:active {
    cursor: grabbing;
}

.knob-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
}

/* ===== Orientation Button ===== */
.orientation-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.orientation-btn:hover {
    background: #f3f4f6;
    color: #8b5cf6;
}

.orientation-btn .material-symbols-outlined {
    font-size: 20px;
}

.orientation-btn-lg {
    width: 138px;
    height: 138px;
    border-radius: 0;
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.orientation-btn-lg:focus,
.orientation-btn-lg:focus-visible {
    outline: none;
}

.orientation-btn-lg:hover {
    color: #8b5cf6;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
}

.orientation-btn-lg .material-symbols-outlined {
    font-size: 72px;
}

@media (max-width: 640px) {
    .orientation-btn-lg {
        width: 110px;
        height: 110px;
    }

    .orientation-btn-lg .material-symbols-outlined {
        font-size: 56px;
    }
}

/* ===== Mode Panels ===== */
.mode-panel {
    text-align: center;
}

.mode-panel.hidden {
    display: none;
}

/* ===== Color Pickers ===== */
.color-pickers {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.color-pickers input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    padding: 0;
    background: transparent;
    transition: all 0.2s ease;
}

.color-pickers input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-pickers input[type="color"]::-webkit-color-swatch {
    border-radius: 50%;
    border: none;
}

.color-pickers input[type="color"]:hover {
    border-color: #8b5cf6;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
}

/* ===== Color Count Buttons ===== */
.color-count-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    background: #f9fafb;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.color-count-btn:hover {
    border-color: #8b5cf6;
    color: #374151;
}

/* ===== Hex Inputs ===== */
.hex-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.hex-inputs input[type="text"] {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    width: 120px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.hex-inputs input[type="text"]::placeholder {
    color: #9ca3af;
}

.hex-inputs input[type="text"]:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

@media (max-width: 640px) {
    .hex-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hex-inputs input[type="text"] {
        width: 100%;
    }
}

/* ===== Download Button ===== */
.download-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 14px 36px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: center;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
    animation: downloadPulse 2s ease-in-out infinite;
}

@keyframes downloadPulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 2px 28px rgba(139, 92, 246, 0.5); }
}

.download-btn:hover {
    box-shadow: 0 2px 32px rgba(139, 92, 246, 0.4);
    transform: scale(1.03);
    background: linear-gradient(135deg, #f472b6, #a78bfa, #60a5fa);
}

.download-btn:active {
    transform: scale(0.97);
}

.download-btn .material-symbols-outlined {
    font-size: 20px;
}

/* ===== Share Buttons ===== */
#shareBar { position: relative; }

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px) scale(1.1);
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.share-btn .material-symbols-outlined { font-size: 25px; }
.share-btn .share-text { font-family: 'Sora', sans-serif; font-size: 23px; font-weight: 700; }
.share-btn.copied { background: #4caf50; color: #fff; border-color: #4caf50; }

#shareBar .share-btn[data-platform="copy"] { background: #7c3aed; color: #fff; border-color: #7c3aed; }
#shareBar .share-btn[data-platform="x"] { background: #1a1a1a; color: #fff; border-color: #444; }
#shareBar .share-btn[data-platform="facebook"] { background: #2563eb; color: #fff; border-color: #2563eb; }
#shareBar .share-btn[data-platform="reddit"] { background: #ea580c; color: #fff; border-color: #ea580c; }

/* ===== Share Toast ===== */
.share-toast {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #333;
    padding: 8px 18px;
    border-radius: var(--radius);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.share-toast.show { opacity: 1; }

/* ===== Footer ===== */
footer.gradient-bg {
    border-top-color: rgba(139, 92, 246, 0.2) !important;
}

footer .gradient-text {
    font-size: 24px;
    font-weight: 700;
}

/* ===== Color Picker Overlay ===== */
.color-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.color-picker-overlay.hidden {
    display: none;
}

.color-picker-overlay input[type="color"] {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 640px) {
    .color-picker-overlay input[type="color"] {
        width: 160px;
        height: 160px;
        margin-left: -80px;
        margin-top: -80px;
    }
}

/* ===== Tool Grid (team.php) ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
}

.tool-item {
    display: flex;
    flex-direction: column;
}

.tool-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #6b7280;
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Responsive Text ===== */
@media (max-width: 640px) {
    h1.gradient-text {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
}
