/* assets/css/style.css - Taeho's Internet Tools Modern Design System */

/* --- Google / Pretendard Typography & CSS Reset --- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    /* Color Palette - Light Theme */
    --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --accent: #06b6d4;
    --accent-light: #ecfeff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-subtle: #f8fafc;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #818cf8;
    
    --text-main: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --text-inverse: #ffffff;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Tokens */
[data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.15);
    --primary-glow: rgba(99, 102, 241, 0.25);

    --accent: #22d3ee;
    --accent-light: rgba(34, 211, 238, 0.15);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);

    --bg-page: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #172033;
    --bg-input: #0f172a;
    --bg-muted: #1e293b;
    --bg-subtle: #162032;

    --border-color: #27354f;
    --border-hover: #374768;
    --border-focus: #6366f1;

    --text-main: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --text-inverse: #0f172a;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* Global Reset & Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Top App Header & Navigation */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .app-header {
    background: rgba(17, 24, 39, 0.85);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 3px 10px var(--primary-glow);
}

.brand-title {
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Nav Menu Items */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.nav-link svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-main);
    background: var(--bg-muted);
}

.nav-link:hover svg {
    opacity: 1;
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.nav-link.active svg {
    opacity: 1;
    stroke: var(--primary);
}

/* Header Action Controls */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-theme-toggle {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-theme-toggle:hover {
    color: var(--text-main);
    border-color: var(--border-hover);
    background: var(--border-color);
}

/* Main Layout Wrapper */
.main-wrapper {
    flex: 1;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* Page Header & Breadcrumb */
.page-hero {
    margin-bottom: 2rem;
    text-align: left;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.5;
}

/* Modern Card Component */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.form-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-input, .form-select, textarea.form-input {
    width: 100%;
    padding: 0.65rem 0.95rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-main);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-input::placeholder {
    color: var(--text-subtle);
}

/* Radio & Checkbox Modern Chips */
.chip-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-body);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip-label input[type="radio"],
.chip-label input[type="checkbox"] {
    accent-color: var(--primary);
}

.chip-label:hover {
    border-color: var(--border-hover);
    background: var(--border-color);
}

.chip-label:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

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

.btn-secondary {
    background: var(--bg-muted);
    color: var(--text-body);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-copy {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Modern Result Box Component */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
    overflow: hidden;
}

.result-header {
    background: var(--bg-subtle);
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-body {
    padding: 1.25rem;
}

.code-display {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88rem;
    color: var(--text-main);
    word-break: break-all;
    position: relative;
    line-height: 1.6;
}

/* Modern Data Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.modern-table th {
    background: var(--bg-muted);
    color: var(--text-main);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.modern-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-body);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover td {
    background-color: var(--bg-muted);
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--accent-light);
    color: var(--accent);
}

/* Notice / Alert Box */
.alert-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-info {
    background: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--text-main);
}

.alert-warning {
    background: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
}

[data-theme="dark"] .alert-warning {
    color: #fcd34d;
}

/* Home / Dashboard Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #ffffff;
}

.icon-ip { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.icon-date { background: linear-gradient(135deg, #10b981, #059669); }
.icon-time { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-hash { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.icon-ical { background: linear-gradient(135deg, #ec4899, #f43f5e); }

.tool-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

/* Timeline Component */
.timeline {
    position: relative;
    padding-left: 1.75rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary);
}

.timeline-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.timeline-list {
    list-style: disc;
    padding-left: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* Footer Component */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 2rem 1.25rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .header-inner {
        padding: 0.6rem 1rem;
    }
    
    .nav-menu {
        gap: 0.2rem;
    }
    
    .nav-link {
        padding: 0.45rem 0.75rem;
        font-size: 0.84rem;
    }
    
    .main-wrapper {
        padding: 1.25rem 1rem 2rem;
    }
    
    .page-title {
        font-size: 1.45rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
