@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    /* Original Orange Palette */
    --primary-color: #ff9800;
    /* Original Orange */
    --primary-hover: #f57c00;
    --primary-light: #ffe0b2;
    --secondary-color: #333333;
    /* Dark Grey */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f9f9f9;
    --card-bg: #FFFFFF;
    --border-color: #e0e0e0;

    /* 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);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 70px;
}

/* ... (rest of reset) ... */

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
    /* Use flex to ensure alignment if needed, though absolute is fine with relative parent */
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 16px 24px;
    padding-left: 56px;
    /* Increased padding for icon */
    font-size: 1.1rem;
    border: 2px solid transparent;
    border-radius: 50px;
    /* More rounded for modern look */
    background-color: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /* Ensure it takes full height for vertical centering if needed */
    max-height: 24px;
    /* Limit height */
}


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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.2s;
}

.logo span {
    font-size: 1.5rem;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFFFFF 100%);
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero p {
    padding: 60px 0;
}

.tool-category {
    margin-bottom: 60px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.category-icon {
    font-size: 1.5rem;
}

.tool-category h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Tool Page Styles */
.tool-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.tool-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

textarea,
input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', monospace;
    /* Monospace for code/data inputs */
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.2s;
    background-color: #fff;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button.secondary {
    background-color: #F3F4F6;
    color: var(--text-color);
}

button.secondary:hover {
    background-color: #E5E7EB;
}

.output-group {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: auto;
}

footer .container {
    text-align: center;
}

footer p {
    color: var(--text-light);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }

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

    .tool-container {
        padding: 24px;
    }

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

/* Utility Classes */
.hidden {
    display: none !important;
}