:root {
    font-size: 10px;
    /* Modern color palette with light background */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    
    /* Text colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Border and surface */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --surface-elevated: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
/* Spacing (preserve original visual sizes under 10px root) */
--space-xs: 0.8rem;    /* 8px */
--space-sm: 1.2rem;    /* 12px */
--space-md: 1.6rem;    /* 16px */
--space-lg: 2.4rem;    /* 24px */
--space-xl: 3.2rem;    /* 32px */
--space-2xl: 4.8rem;   /* 48px */

/* Typography (preserve original visual sizes under 10px root) */
--font-size-xs: 1.2rem;     /* 12px */
--font-size-sm: 1.4rem;     /* 14px */
--font-size-base: 1.6rem;   /* 16px */
--font-size-lg: 1.8rem;     /* 18px */
--font-size-xl: 2rem;       /* 20px */
--font-size-2xl: 2.4rem;    /* 24px */
--font-size-3xl: 3rem;      /* 30px */
--font-size-4xl: 3.6rem;    /* 36px */

    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dig-tool body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6{
	font-weight: 700;
    margin: var(--space-sm) 0px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    --font-base: 16px;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-xl);
}

header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.container h1 {
    font-size: var(--font-size-4xl);
}

.container h2 {
    font-size: var(--font-size-3xl);
}

.container h3 {
    font-size: var(--font-size-2xl);
}

.container h4 {
    font-size: var(--font-size-xl);
}

.container h5 {
    font-size: var(--font-size-lg);
}

.container h6 {
    font-size: var(--font-size-lg);
}



.subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-xl);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}


/* 	left-aligned list with custom arrows */
	
	.list-arrow ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.list-arrow ul li {
    position: relative;
    padding-left: 30px;
    line-height: 1.5;
}

.list-arrow ul li::before {
    content: '➜';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
}




.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    background: var(--surface-elevated);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.dimension-inputs,
.color-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.format-text-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.border-radius-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

input[type="text"],
input[type="number"],
select {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    width: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-1px);
}

input[type="text"]:hover,
input[type="number"]:hover,
select:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.color-picker-group {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
}

input[type="color"] {
    width: 48px;
    height: 48px;
    padding: 4px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

input[type="color"]:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.color-picker-group input[type="text"] {
    flex: 1;
}

.preset-sizes {
    margin-top: var(--space-md);
}

.preset-sizes label {
    margin-bottom: var(--space-md);
    display: block;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-sm);
}

.preset-buttons button {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.preset-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left var(--transition-slow);
}

.preset-buttons button:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.preset-buttons button:hover::before {
    left: 100%;
}

.preset-buttons button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.preview-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    min-height: 320px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.preview-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.preview-container:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

#previewImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

#previewImage:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.url-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.url-group {
    display: flex;
    gap: var(--space-sm);
    align-items: stretch;
}

.url-group input {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: var(--font-size-sm);
    background: var(--bg-primary);
}

.btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left var(--transition-slow);
}

.btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-color: var(--primary-color);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.btn-primary::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--accent-color) 100%);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: var(--shadow-xl);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: var(--space-lg);
    }
    
    .generator-container {
        gap: var(--space-xl);
        padding: var(--space-xl);
    }
    
    .border-radius-inputs {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--space-md);
    }

    .generator-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: var(--space-lg);
    }

    .dimension-inputs,
    .color-inputs {
        grid-template-columns: 1fr;
    }
    
    .border-radius-inputs {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }
    
    .subtitle {
        font-size: var(--font-size-lg);
    }
    
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .url-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--space-sm) !important;
    }
    
    .generator-container {
        padding: var(--space-md);
    }
    
    h1 {
        font-size: var(--font-size-2xl);
    }
  	.preview-container {
    	padding: var(--space-md) !important;
	}
    
    .preset-buttons {
        grid-template-columns: 1fr;
}

/* Enhanced focus states for accessibility */
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading state animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading {
    background: linear-gradient(90deg, var(--bg-secondary) 0px, var(--bg-tertiary) 40px, var(--bg-secondary) 80px);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* Enhanced input styles */
.input-help {
            font-size: var(--font-size-xs);
            color: var(--text-muted);
            margin-top: 2px;
            font-weight: 400;
        }

        .preset-label {
            display: block;
            font-size: var(--font-size-xs);
            color: var(--text-muted);
            font-weight: 400;
            margin-top: 2px;
        }

        .preset-buttons button {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: var(--space-sm);
            min-height: 60px;
        }

        /* Enhanced focus states */
        button:focus-visible,
        input:focus-visible,
        select:focus-visible {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
        }

        /* Smooth image loading */
        #previewImage {
            transition: all var(--transition-normal);
        }

        #previewImage[src*="dummyimage.com"] {
            opacity: 1;
        }