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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.logo-text span {
    color: #1a73e8;
}

.logo-desc {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

/* Search */
.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 4px;
    width: 280px;
    border: 1px solid #e8e8e8;
}

.search-box:focus-within {
    border-color: #1a73e8;
    background: #fff;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.search-box button {
    background: #1a73e8;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-box button:hover {
    background: #1557b0;
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: #333;
    text-decoration: none;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-item > a:hover,
.nav-item > a.active {
    color: #1a73e8;
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    background: #fff;
    min-width: 160px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: #333;
    padding: 10px 16px;
    display: block;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    color: #1a73e8;
    background: #f5f5f5;
}

/* Main */
.main-content {
    padding: 20px 0 40px;
}

/* Section */
.section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid #1a73e8;
    margin-bottom: 15px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 18px;
}

.section-title h2 {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.section-more {
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
}

.section-more:hover {
    color: #1557b0;
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Tool Card */
.tool-card {
    background: #fff;
    border-radius: 4px;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e8e8e8;
    transition: all 0.2s;
    display: block;
}

.tool-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tool-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.tool-card-icon.blue { background: #1a73e8; }
.tool-card-icon.green { background: #34a853; }
.tool-card-icon.orange { background: #fbbc05; }
.tool-card-icon.red { background: #ea4335; }
.tool-card-icon.purple { background: #673ab7; }
.tool-card-icon.teal { background: #009688; }

.tool-card-title {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.tool-card-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tool-card-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    background: #e8f0fe;
    color: #1a73e8;
}

/* Tool Page */
.tool-page-header {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e8e8e8;
}

.tool-page-header h1 {
    font-size: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-page-header p {
    color: #666;
    margin-top: 6px;
    font-size: 14px;
}

/* Tool Container */
.tool-container {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    border: 1px solid #e8e8e8;
}

/* Panel */
.panel {
    margin-bottom: 15px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 10px;
}

.panel-header h3 {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* Textarea */
.code-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    resize: vertical;
    background: #fafafa;
    line-height: 1.5;
}

.code-textarea:focus {
    outline: none;
    border-color: #1a73e8;
    background: #fff;
}

.code-textarea[readonly] {
    background: #f5f5f5;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.btn {
    padding: 8px 20px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #333;
}

.btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.btn-primary:hover {
    background: #1557b0;
    color: #fff;
}

.btn-secondary {
    background: #34a853;
    color: #fff;
    border-color: #34a853;
}

.btn-secondary:hover {
    background: #2d8e47;
    color: #fff;
}

.btn-info {
    background: #fbbc05;
    color: #fff;
    border-color: #fbbc05;
}

.btn-info:hover {
    background: #e5ac00;
    color: #fff;
}

.btn-success {
    background: #673ab7;
    color: #fff;
    border-color: #673ab7;
}

.btn-success:hover {
    background: #5a32a3;
    color: #fff;
}

.btn-danger {
    background: #ea4335;
    color: #fff;
    border-color: #ea4335;
}

.btn-danger:hover {
    background: #d63327;
    color: #fff;
}

.btn-outline {
    background: #fff;
    border: 1px solid #e8e8e8;
    color: #666;
}

.btn-outline:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* Validation Result */
.validation-result {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    display: none;
    font-size: 14px;
}

.validation-result.success {
    display: block;
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #81c995;
}

.validation-result.error {
    display: block;
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f28b82;
}

/* Current Time */
.current-time-box {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.current-time-box h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.time-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.time-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-label {
    font-size: 13px;
    opacity: 0.9;
}

.time-value {
    font-size: 15px;
}

.time-value.mono {
    font-family: Consolas, monospace;
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 3px;
}

/* Converter */
.converter-section {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.converter-section h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Form */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #666;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #1a73e8;
}

/* Output Box */
.output-box {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #e8e8e8;
    min-height: 50px;
    font-size: 14px;
}

.output-box:empty::before {
    content: "结果将显示在这里...";
    color: #999;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.result-label {
    color: #666;
    font-size: 13px;
    min-width: 80px;
}

.result-value {
    color: #333;
    font-size: 14px;
}

.result-value.mono {
    font-family: Consolas, monospace;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 12px 0;
    margin-top: 30px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-inner a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.footer-inner a:hover {
    color: #1a73e8;
}

.footer-copyright {
    color: #999;
    font-size: 13px;
}

/* Loading */
.btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Responsive */
@media (max-width: 1000px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
        gap: 10px;
    }

    .search-box {
        order: 3;
        width: 100%;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-item > a {
        padding: 0 15px;
        height: 40px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .btn {
        flex: 1;
        min-width: calc(50% - 5px);
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.lang-btn.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}