:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --popover: #ffffff;
    --popover-foreground: #0a0a0a;
    --primary: #0a0a0a;
    --primary-foreground: #ffffff;
    --secondary: #f5f5f5;
    --secondary-foreground: #0a0a0a;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #f5f5f5;
    --accent-foreground: #0a0a0a;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e5e5e5;
    --input: #ffffff;
    --ring: #0a0a0a;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--foreground);
    text-decoration: none;
}

.navbar-nav .nav-item .nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-weight: 500;
}

.navbar-nav .nav-item .nav-link:hover {
    color: var(--foreground);
    background-color: var(--accent);
}

.navbar-nav .nav-item.active .nav-link {
    color: var(--foreground);
    background-color: var(--accent);
}

.navbar-toggler {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.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(10, 10, 10, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Header */
header {
    text-align: center;
    margin: 4rem 0 3rem;
    padding: 2rem 0;
}

header h1 {
    color: var(--foreground);
    margin-bottom: 1rem;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

header .lead {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Input Section */
.input-section {
        display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    flex-direction: column;
}

.form-floating {
    flex-grow: 1;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--input);
    color: var(--foreground);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.form-control:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgb(10 10 10 / 0.1);
}

.form-control::placeholder {
    color: var(--muted-foreground);
}

.form-floating label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
    pointer-events: none;
    font-size: 1rem;
}

.form-floating .form-control:focus + label,
.form-floating .form-control:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--foreground);
    background-color: var(--background);
    padding: 0 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    box-shadow: var(--shadow);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(10 10 10 / 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-dark {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-dark:hover {
    background-color: #000000;
    border-color: #000000;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Results Section */
.results-section {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.results-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: var(--shadow);
}

.tag:hover {
    background-color: var(--accent);
    border-color: var(--accent-foreground);
}

.tag.selected {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#copyMessage {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Loader */
.loader {
    text-align: center;
    margin: 2rem 0;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* About Section */
#about-tool {
    margin: 4rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#about-tool h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    letter-spacing: -0.025em;
}

#about-tool h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--foreground);
}

#about-tool h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--foreground);
}

#about-tool p {
    margin-bottom: 1rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

#about-tool .lead {
    font-size: 1.125rem;
    color: var(--foreground);
    font-weight: 500;
}

#about-tool ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

#about-tool li {
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
}

#about-tool strong {
    color: var(--foreground);
    font-weight: 600;
}

.bg-light {
    background-color: var(--secondary) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.alert-info {
    background-color: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--accent-foreground);
}

.text-muted {
    color: var(--muted-foreground) !important;
}

/* Footer */
footer {
    background-color: var(--secondary);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 0;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

footer p {
    color: var(--muted-foreground);
    margin-bottom: 0;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer li {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--foreground);
}

footer .text-center {
    background-color: var(--muted);
    padding: 1rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    .input-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-section .form-floating {
        width: 100%;
    }
    
    .input-section .btn {
        width: 100%;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .results-section {
        padding: 1.5rem;
    }
    
    #about-tool h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}
  .input-section .form-floating {
        width: 100%;
        flex: 1;
    }
    .input-section .btn {
        width: 100%;
    }


/* Utility Classes */
.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.bg-white {
    background-color: var(--background) !important;
}

.bg-body-tertiary {
    background-color: var(--background) !important;
}

.text-dark {
    color: var(--foreground) !important;
}

.border {
    border: 1px solid var(--border) !important;
}

.rounded {
    border-radius: var(--radius) !important;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Grid Background for Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(180deg, rgba(250, 250, 250, 1) 0%, rgba(237, 241, 255, 1) 99%);
}
.grid-background {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, #e4e4e7 1px, transparent 1px),
        linear-gradient(to bottom, #e4e4e7 1px, transparent 1px);
    z-index: 1;
}
.radial-overlay {
    pointer-events: none;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    mask-image: radial-gradient(ellipse at center, transparent 20%, black);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 20%, black);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem 2.5rem 1rem;
    text-align: center;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--foreground);
    margin-bottom: 1.25rem;
}
.form-floating .form-control:focus + label, .form-floating .form-control:not(:placeholder-shown) + label {
    background-color: #fbfbfb00 !important;
    line-height: 18px !important;
    height: fit-content;
}
.hero-title .highlight {
    color: #000000c4;
    background: linear-gradient(300deg, rgba(250, 250, 250, 1) 0%, rgba(227, 224, 255, 1) 99%);
    padding: 5px 10px;
    border-radius: 6px;
}
.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    font-weight: 400;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
@media (max-width: 600px) {
    .hero-title {
        font-size: 1.5rem;
    }
    .hero-content {
        padding: 2rem 0.5rem 1.5rem 0.5rem;
    }
    .hero-section {
        min-height: 350px;
    }
}
