/* Global Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #e8ecf8;
    background-color: #0b1020;
    min-height: 100vh;
    line-height: 1.6;
}

/* Home / Index page specific */
.main-content {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at center, #1b264f 0%, #0b1020 100%);
}

.jw-text {
    font-size: clamp(6rem, 18vw, 15rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff 0%, #6c8cff 50%, #38e1c6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
}

/* Sidebar Navigation */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: rgba(11, 16, 32, 0.96);
    backdrop-filter: blur(12px);
    overflow-x: hidden;
    transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 60px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar.open {
    width: 280px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-nav a {
    padding: 12px 24px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: #9aa6c7;
    transition: color 0.2s ease, background-color 0.2s ease, padding-left 0.2s ease;
}

.sidebar-nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 32px;
}

.sidebar .close-btn {
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: 32px;
    text-decoration: none;
    color: #9aa6c7;
    transition: color 0.2s ease;
    line-height: 1;
}

.sidebar .close-btn:hover {
    color: #ffffff;
}

.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 900;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(108, 140, 255, 0.5);
    transform: translateY(-2px);
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #38e1c6;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38e1c6;
    box-shadow: 0 0 10px #38e1c6;
}

/* Developer Tools Page Styles */
.devtools-container {
    --dt-bg: #0b1020;
    --dt-bg-2: #121a33;
    --dt-card: rgba(255, 255, 255, 0.05);
    --dt-card-hover: rgba(255, 255, 255, 0.09);
    --dt-border: rgba(255, 255, 255, 0.10);
    --dt-text: #e8ecf8;
    --dt-muted: #9aa6c7;
    --dt-accent: #6c8cff;
    --dt-accent-2: #38e1c6;

    color: var(--dt-text);
    background:
      radial-gradient(900px 500px at 10% -10%, rgba(108, 140, 255, 0.25), transparent 60%),
      radial-gradient(800px 500px at 100% 0%, rgba(56, 225, 198, 0.15), transparent 60%),
      linear-gradient(180deg, var(--dt-bg), var(--dt-bg-2));
    min-height: 100vh;
    line-height: 1.5;
    padding-top: 40px;
}

.devtools-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 24px 32px;
    text-align: center;
}

.devtools-header h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    margin: 20px 0 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, var(--dt-accent) 60%, var(--dt-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.devtools-header p {
    color: var(--dt-muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.devtools-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.devtools-main .tool {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    background: var(--dt-card);
    border: 1px solid var(--dt-border);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.devtools-main .tool::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px 120px at 0% 0%, rgba(108, 140, 255, 0.18), transparent 70%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.devtools-main .tool:hover,
.devtools-main .tool:focus-visible {
    transform: translateY(-6px);
    background: var(--dt-card-hover);
    border-color: rgba(108, 140, 255, 0.55);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    outline: none;
}

.devtools-main .tool:hover::after,
.devtools-main .tool:focus-visible::after {
    opacity: 1;
}

.devtools-main .icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--dt-accent), var(--dt-accent-2));
    box-shadow: 0 8px 20px rgba(108, 140, 255, 0.35);
}

.devtools-main .icon svg {
    width: 30px;
    height: 30px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.devtools-main .tool h2 {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.devtools-main .tool p {
    color: var(--dt-muted);
    font-size: .95rem;
    flex: 1;
}

.devtools-main .open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--dt-accent);
}

.devtools-main .open svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform .25s ease;
}

.devtools-main .tool:hover .open svg {
    transform: translateX(5px);
}

.devtools-footer {
    text-align: center;
    color: var(--dt-muted);
    font-size: .85rem;
    padding: 28px 24px 48px;
    border-top: 1px solid var(--dt-border);
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================
   About Me Page Styles
   ========================================= */
.about-container {
    --abt-bg: #0b1020;
    --abt-bg-2: #121a33;
    --abt-card: rgba(255, 255, 255, 0.05);
    --abt-card-hover: rgba(255, 255, 255, 0.08);
    --abt-border: rgba(255, 255, 255, 0.10);
    --abt-border-hover: rgba(108, 140, 255, 0.45);
    --abt-text: #e8ecf8;
    --abt-muted: #9aa6c7;
    --abt-accent: #6c8cff;
    --abt-accent-2: #38e1c6;

    color: var(--abt-text);
    background:
      radial-gradient(1000px 600px at 20% -10%, rgba(108, 140, 255, 0.22), transparent 60%),
      radial-gradient(800px 500px at 90% 10%, rgba(56, 225, 198, 0.14), transparent 60%),
      linear-gradient(180deg, var(--abt-bg), var(--abt-bg-2));
    min-height: 100vh;
    padding: 60px 24px 80px;
}

.about-hero {
    max-width: 800px;
    margin: 30px auto 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 24px;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(108, 140, 255, 0.35);
    background-color: var(--abt-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.04);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 32px rgba(56, 225, 198, 0.45);
}

.about-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #ffffff, var(--abt-accent) 60%, var(--abt-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-subtitle {
    font-size: 1.15rem;
    color: var(--abt-muted);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto 24px;
}

.about-cv-action {
    margin-top: 8px;
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--abt-accent), #4f6bd6);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(108, 140, 255, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-cv:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(108, 140, 255, 0.5);
    background: linear-gradient(135deg, #7c9aff, var(--abt-accent));
}

.btn-cv svg {
    transition: transform 0.25s ease;
}

.btn-cv:hover svg {
    transform: translateY(2px);
}

.about-section {
    max-width: 1100px;
    margin: 0 auto 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin: 14px 0 10px;
    color: #ffffff;
}

.section-header p {
    color: var(--abt-muted);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1rem;
}

.section-card {
    background: var(--abt-card);
    border: 1px solid var(--abt-border);
    border-radius: 20px;
    padding: 36px 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.section-card h2 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 16px;
    display: inline-block;
    border-bottom: 2px solid var(--abt-accent-2);
    padding-bottom: 6px;
}

.section-card p {
    color: #cfd8ec;
    font-size: 1.05rem;
    line-height: 1.8;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--abt-card);
    border: 1px solid var(--abt-border);
    border-radius: 18px;
    padding: 30px;
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    background: var(--abt-card-hover);
    border-color: var(--abt-border-hover);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.skill-card.full-width-card {
    grid-column: 1 / -1;
}

.skill-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--abt-accent), var(--abt-accent-2));
    color: #ffffff;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(108, 140, 255, 0.3);
}

.skill-card h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--abt-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.hobby-card {
    background: var(--abt-card);
    border: 1px solid var(--abt-border);
    border-radius: 18px;
    padding: 26px;
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.hobby-card:hover {
    transform: translateY(-4px);
    background: var(--abt-card-hover);
    border-color: var(--abt-border-hover);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

.hobby-badge {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hobby-badge::before {
    content: "•";
    color: var(--abt-accent-2);
    font-size: 1.5rem;
    line-height: 0;
}

.hobby-card p {
    color: var(--abt-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.about-footer {
    text-align: center;
    color: var(--abt-muted);
    font-size: 0.88rem;
    padding: 30px 24px 0;
    border-top: 1px solid var(--abt-border);
    max-width: 1100px;
    margin: 40px auto 0;
}

@media (max-width: 768px) {
    .about-container {
        padding: 50px 16px 60px;
    }

    .section-card {
        padding: 24px 20px;
    }

    .skill-card {
        padding: 22px;
    }

    .skills-grid, .hobbies-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .devtools-main .tool,
    .devtools-main .open svg,
    .profile-pic,
    .btn-cv,
    .skill-card,
    .hobby-card {
        transition: none !important;
    }
}

/* ==========================================================================
   Colour Converter Tool Styles
   ========================================================================== */
.converter-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-left: 120px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9aa6c7;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #ffffff;
}

.converter-header {
    text-align: center;
    margin-bottom: 36px;
}

.converter-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.converter-header p {
    color: #9aa6c7;
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
}

/* Main Layout */
.converter-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1024px) {
    .converter-layout {
        grid-template-columns: 1fr;
    }
    .top-nav-bar {
        padding-left: 0;
        margin-top: 50px;
    }
}

/* Card Styles */
.converter-card {
    background: rgba(18, 26, 49, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.converter-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.converter-card-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Left Sidebar: Saved Colours List */
.colour-sidebar {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .colour-sidebar {
        position: static;
        max-height: 480px;
    }
}

.sidebar-search {
    margin-bottom: 12px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(11, 16, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-search input:focus {
    border-color: #6c8cff;
}

.colour-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 6px;
    flex: 1;
    min-height: 120px;
}

.colour-list::-webkit-scrollbar {
    width: 6px;
}
.colour-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}
.colour-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.empty-saved-colours {
    text-align: center;
    padding: 30px 16px;
    color: #9aa6c7;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-saved-colours svg {
    opacity: 0.4;
}

.colour-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    color: inherit;
    position: relative;
    user-select: none;
}

.colour-list-item:hover, .colour-list-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(108, 140, 255, 0.4);
    transform: translateX(2px);
}

.colour-list-square {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.colour-list-info {
    flex: 1;
    min-width: 0;
}

.colour-list-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.colour-list-values {
    font-size: 0.76rem;
    color: #9aa6c7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: flex;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-delete-colour {
    background: transparent;
    border: none;
    color: #9aa6c7;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-delete-colour:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    opacity: 1;
}

/* Right / Main Workspace */
.workspace {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Visual Guide & Interactive Preview */
.preview-section {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .preview-section {
        grid-template-columns: 1fr;
    }
}

.visual-preview-box {
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background-color 0.15s ease;
    position: relative;
    overflow: hidden;
}

.preview-label-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    align-self: flex-start;
}

.preview-center-text {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin: auto 0;
    word-break: break-all;
}

.preview-bottom-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

.preview-info-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.current-color-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.current-color-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.nearest-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #38e1c6;
    background: rgba(56, 225, 198, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 225, 198, 0.25);
}

.btn-save-colour-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2d6cdf, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 108, 223, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-save-colour-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(45, 108, 223, 0.5);
    background: linear-gradient(135deg, #3b82f6, #6c8cff);
}

.btn-save-colour-trigger:active {
    transform: translateY(0);
}

/* Conversion Form Inputs */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.format-card {
    background: rgba(11, 16, 32, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.format-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #9aa6c7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-copy {
    background: transparent;
    border: none;
    color: #6c8cff;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(108, 140, 255, 0.15);
    color: #ffffff;
}

.format-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.format-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.format-input:focus {
    border-color: #6c8cff;
    background: rgba(255, 255, 255, 0.08);
}

.native-picker-wrapper {
    margin-left: 8px;
    position: relative;
}

.native-color-picker {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    cursor: pointer;
}

.picker-btn-ui {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d6cdf;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Sliders Section */
.sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .sliders-grid {
        grid-template-columns: 1fr;
    }
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(11, 16, 32, 0.4);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #9aa6c7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
    color: #d6e2fb;
}

.slider-meta span:last-child {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #6c8cff;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    border: 2px solid #2d6cdf;
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    border: 2px solid #2d6cdf;
}

/* 128 Preset Colours Section */
.palette-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.palette-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.palette-stats {
    font-size: 0.85rem;
    color: #9aa6c7;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 8px;
    background: rgba(11, 16, 32, 0.4);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preset-swatch {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.preset-swatch:hover {
    transform: scale(1.22);
    z-index: 10;
    border-color: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

.preset-swatch.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #2d6cdf, 0 4px 10px rgba(0, 0, 0, 0.5);
    transform: scale(1.12);
    z-index: 5;
}

.preset-swatch[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 16, 32, 0.95);
    color: #ffffff;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-weight: 500;
}

/* Save Colour Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 11, 23, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #121a31;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #9aa6c7;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 8px;
    transition: color 0.2s, background-color 0.2s;
}

.modal-close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: rgba(11, 16, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.modal-colour-swatch {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.modal-info-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.modal-info-row {
    display: flex;
    justify-content: space-between;
    color: #9aa6c7;
}

.modal-info-row strong {
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d6e2fb;
}

.modal-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(11, 16, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input:focus {
    border-color: #6c8cff;
    box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.25);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 16, 32, 0.4);
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #9aa6c7;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-modal-submit {
    background: linear-gradient(135deg, #2d6cdf, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 108, 223, 0.35);
    transition: all 0.2s;
}

.btn-modal-submit:hover {
    box-shadow: 0 6px 18px rgba(45, 108, 223, 0.5);
    background: linear-gradient(135deg, #3b82f6, #6c8cff);
}

/* Notification toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2d6cdf;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}
