/* ToolMate Professional Web Utilities - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #f9fafb;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

/* Header Styles */
.header {
    background: var(--card-background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-brand i {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    background: #3b82f6;
    padding: 5rem 2rem;
    text-align: center;
     
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-primary:hover {
    background: #f1f1f1;
}

.btn-outline {
    background: transparent;
    color: white; /* 글자색을 흰색으로 변경 */
    border: 2px solid white; /* 테두리 색상을 흰색으로 변경 */
}
.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
    background: var(--card-background);
}

.tools-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.info-card {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tool-icon.markdown { background: #dbeafe; color: #3b82f6; }
.tool-icon.grammar { background: #dcfce7; color: #16a34a; }
.tool-icon.lorem { background: #f3e8ff; color: #9333ea; }
.tool-icon.pdf { background: #fee2e2; color: #dc2626; }

.tool-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-users {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0; /* 이 부분을 수정했습니다. */
        left: 0;
        width: 100%;
        background: var(--card-background);
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem; /* 여백을 추가하여 버튼 크기 확대 */
    color: var(--text-primary);
    font-size: 1.8rem; /* 아이콘 크기 확대 */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        padding: 1rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Tool Page Specific Styles */
.tool-page {
    min-height: 100vh;
    padding: 2rem 0;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tool-content {
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}
.tool-content a {
    color: #007bff !important;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.tool-panel {
    background: var(--card-background);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-preview {
    min-height: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: #f8fafc;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    overflow-y: auto;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }

/* Loading States */
.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}