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

/* CSS Custom Properties (Design System) */
:root {
    --background: hsl(0 0% 97%);
    --foreground: hsl(220 13% 13%);
    --card: hsl(0 0% 100%);
    --card-foreground: hsl(220 13% 13%);
    --popover: hsl(0 0% 100%);
    --popover-foreground: hsl(220 13% 13%);
    --primary: hsl(15 100% 60%);
    --primary-foreground: hsl(0 0% 100%);
    --secondary: hsl(220 13% 95%);
    --secondary-foreground: hsl(220 13% 13%);
    --muted: hsl(220 13% 95%);
    --muted-foreground: hsl(220 9% 46%);
    --accent: hsl(15 100% 60%);
    --accent-foreground: hsl(0 0% 100%);
    --destructive: hsl(0 84% 60%);
    --destructive-foreground: hsl(0 0% 100%);
    --border: hsl(220 13% 91%);
    --input: hsl(220 13% 91%);
    --ring: hsl(15 100% 60%);
    --radius: 0.5rem;
}

.dark {
    --background: hsl(220 13% 13%);
    --foreground: hsl(0 0% 97%);
    --card: hsl(220 13% 16%);
    --card-foreground: hsl(0 0% 97%);
    --popover: hsl(220 13% 16%);
    --popover-foreground: hsl(0 0% 97%);
    --primary: hsl(15 100% 60%);
    --primary-foreground: hsl(0 0% 100%);
    --secondary: hsl(220 13% 20%);
    --secondary-foreground: hsl(0 0% 97%);
    --muted: hsl(220 13% 20%);
    --muted-foreground: hsl(220 9% 65%);
    --accent: hsl(15 100% 60%);
    --accent-foreground: hsl(0 0% 100%);
    --destructive: hsl(0 84% 60%);
    --destructive-foreground: hsl(0 0% 100%);
    --border: hsl(220 13% 25%);
    --input: hsl(220 13% 25%);
    --ring: hsl(15 100% 60%);
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition: background-color 0.3s ease, color
}

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

/* Header */
.header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo a {
    text-decoration: none;
    color: var(--foreground);
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover {
    color: var(--foreground);
}

.nav-link::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover .nav-link::after {
    transform: rotate(180deg);
}

.dropdown-section {
    padding: 1rem;
}

.dropdown-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-section a {
    display: block;
    padding: 0.5rem 0;
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.dropdown-section a:last-child {
    border-bottom: none;
}

.dropdown-section a:hover {
    color: var(--primary);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--secondary);
}

/* Main Content */
.main {
    min-height: calc(100vh - 4rem);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--muted) 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--foreground) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--muted-foreground);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Text Converter Section */
.text-converter-section {
    padding: 2rem 0;
}

.converter-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.converter-header {
    margin-bottom: 2rem;
}

.converter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.text-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.text-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.text-stats strong {
    color: var(--foreground);
    font-weight: 600;
}

/* Textarea */
.main-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.main-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.tool-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

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

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

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

.btn-primary:hover:not(:disabled) {
    background-color: hsl(15 100% 55%);
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: var(--muted);
}

/* Copy Button Styles */
.btn-copy {
    background-color: var(--primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy:hover {
    background-color: hsl(15 100% 55%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy-icon {
    font-size: 1rem;
}

/* Success color variable */
:root {
    --success: hsl(142 76% 36%);
}

.dark {
    --success: hsl(142 76% 45%);
}

/* Character/Word Counter Styles */
.text-counter {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--muted);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.counter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.counter-label {
    font-weight: 500;
}

.counter-value {
    font-weight: 700;
    color: var(--foreground);
    font-size: 1rem;
}

@media (max-width: 640px) {
    .text-counter {
        gap: 1rem;
    }
    
    .counter-item {
        flex: 1 1 45%;
    }
}

/* Share Buttons Styles */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-share-twitter {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.btn-share-twitter:hover {
    background: #1a8cd8;
}

.btn-share-linkedin {
    background: #0077B5;
    color: white;
    border-color: #0077B5;
}

.btn-share-linkedin:hover {
    background: #006399;
}

.btn-share-whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-share-whatsapp:hover {
    background: #20ba5a;
}

.btn-share-link {
    background: var(--muted);
    color: var(--foreground);
    border-color: var(--border);
}

.btn-share-link:hover {
    background: var(--accent);
}

/* Search Functionality Styles */
.search-container {
    position: relative;
    width: 280px;
    margin-right: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--foreground);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(15, 100%, 60%, 0.1);
}

.search-input::placeholder {
    color: var(--muted-foreground);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    min-width: 350px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    display: block;
    color: var(--foreground);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--muted);
}

.search-result-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-icon {
    font-size: 1.25rem;
}

.search-result-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.search-result-category {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
}

@media (max-width: 1024px) {
    .search-container {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .search-container {
        display: none; /* Hide on mobile to save space */
    }
    
    /* Optional: Show search on mobile in a different location */
    .nav-container {
        flex-wrap: wrap;
    }
}

/* Content Pages Styles (About, Contact, Privacy, Terms, etc.) */
.content-section {
    padding: 4rem 0;
}

.content-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.content-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--foreground);
}

.content-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.content-body p {
    margin-bottom: 1rem;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0 1rem 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body a {
    color: var(--primary);
    text-decoration: underline;
}

.content-body a:hover {
    color: hsl(15 100% 55%);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

.email-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    border-radius: var(--radius);
    text-decoration: none !important;
}

.email-link:hover {
    background: var(--muted);
}

@media (max-width: 768px) {
    .content-card {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .content-body h2 {
        font-size: 1.5rem;
    }
}

.btn-destructive {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-destructive:hover:not(:disabled) {
    background-color: hsl(0 84% 55%);
}

.btn-icon {
    font-size: 1rem;
}

/* Button Groups */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tool-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Tools Categories Section */
.tools-categories {
    padding: 4rem 0;
    background-color: var(--muted);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.category-description {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.tool-link:hover {
    background-color: var(--muted);
    border-color: var(--primary);
    transform: translateX(4px);
}

.tool-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--muted);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.tool-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.tool-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* Tool Page Section */
.tool-section {
    padding: 2rem 0;
}

.tool-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tool-header {
    margin-bottom: 2rem;
}

.tool-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-section, .output-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.tool-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.tool-textarea[readonly] {
    background-color: var(--muted);
    cursor: not-allowed;
}

/* Configuration Section */
.config-section {
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.config-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.config-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.config-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    min-width: 80px;
}

.config-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
}

.config-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.config-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

/* Password Display */
.password-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.password-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background-color: var(--muted);
    color: var(--foreground);
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 0.05em;
}

.password-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* 404 Error Page */
.error-content {
    text-align: center;
    padding: 4rem 0;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.error-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--foreground);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.tool-description {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.tool-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-result {
    padding: 0.75rem;
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

/* Range Inputs */
.range-inputs {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.range-input-group {
    flex: 1;
    max-width: 300px;
}

.range-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.range-input {
    width: 100%;
    height: 3.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.range-input::-webkit-outer-spin-button,
.range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.range-input:hover {
    border-color: var(--primary-color);
}

.range-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 15, 0.15);
    outline: none;
}

.generate-button-container {
    text-align: center;
    margin: 2.5rem 0;
}

.generate-btn {
    min-width: 300px;
    height: 3.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.generate-btn:active {
    transform: translateY(0);
}

.result-display {
    text-align: center;
    margin: 2.5rem auto;
    padding: 2.5rem;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-text {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.dark .range-input {
    background: var(--dark-input-bg);
    border-color: var(--dark-border-color);
}

.dark .range-input:hover,
.dark .range-input:focus {
    border-color: var(--primary-color);
}

.dark .result-display {
    background: var(--dark-card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Random Number Generator Styles */
.text-center {
    text-align: center;
}

.tool-description {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.generator-form {
    max-width: 600px;
    margin: 2rem auto;
}

.range-inputs {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.range-input-group {
    flex: 1;
    max-width: 300px;
}

.range-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.range-input {
    width: 100%;
    height: 3.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.range-input::-webkit-outer-spin-button,
.range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.range-input:hover {
    border-color: var(--primary-color);
}

.range-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 15, 0.15);
    outline: none;
}

.generate-button-container {
    text-align: center;
    margin: 2.5rem 0;
}

.generate-btn {
    min-width: 300px;
    height: 3.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.generate-btn:active {
    transform: translateY(0);
}

.result-display {
    text-align: center;
    margin: 2.5rem auto;
    padding: 2.5rem;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-text {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.dark .range-input {
    background: var(--dark-input-bg);
    border-color: var(--dark-border-color);
}

.dark .range-input:hover,
.dark .range-input:focus {
    border-color: var(--primary-color);
}

.dark .result-display {
    background: var(--dark-card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .converter-card {
        padding: 1rem;
    }

    .button-group {
        justify-content: center;
    }

    .action-buttons {
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }

    .range-inputs {
        justify-content: center;
    }

    .password-options {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .toast {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}

/* Dark mode specific adjustments */
.dark .hero {
    background: linear-gradient(135deg, var(--background) 0%, hsl(220 13% 16%) 100%);
}

.dark .tool-card:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}

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

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

/* UUID Generator specific styles */
.generator-section {
    text-align: center;
    margin-bottom: 2rem;
}

.generate-button-container {
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    min-width: 200px;
}

.uuid-display-section {
    margin-bottom: 2rem;
}

.uuid-display {
    background-color: var(--muted);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uuid-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--foreground);
    word-break: break-all;
    text-align: center;
    line-height: 1.5;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-card h4 {
    margin: 0 0 1rem 0;
    color: var(--foreground);
    font-size: 1.125rem;
    font-weight: 600;
}

.info-card p {
    margin: 0 0 1rem 0;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.info-card ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--muted-foreground);
}

.info-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.uuid-format {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) / 2);
    padding: 0.5rem 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--foreground);
    display: inline-block;
    margin: 0.5rem 0;
}

.info-card small {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Conversion Buttons */
.conversion-buttons {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

/* Info Section Wrapper */
.info-section-wrapper {
    padding: 3rem 0;
    background-color: var(--background);
}

.info-content {
    max-width: 900px;
}

.info-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.info-text {
    color: var(--muted-foreground);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.morse-examples {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
}

.examples-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.examples-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.examples-list li {
    padding: 0.5rem 0;
    color: var(--foreground);
    font-size: 0.9375rem;
}

.examples-list code {
    background-color: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) / 2);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--foreground);
}

.tool-description {
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Footer Styles */
.footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .footer-bottom p {
        white-space: normal;
        font-size: 0.75rem;
    }
}

/* Additional Tool Styles */
.tool-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(15, 100%, 60%, 0.1);
}

.result-display {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.result-display .result-text {
    transition: opacity 0.3s ease;
}

.input-grid {
    display: grid;
    gap: 1.5rem;
}

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

.conversion-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .conversion-buttons {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .theme-toggle,
    .btn {
        display: none;
    }
    
    .main {
        margin: 0;
    }
    
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
