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

body {
    font-family: sans-serif;
    background-color: #f4f4f4;
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.nav-container {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar {
    padding: 20px;
}

.sidebar h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #34495e;
    text-align: center;
    font-weight: bold;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidebar ul li a:hover {
    background-color: #34495e;
}

.container {
    background-color: #fff;
    padding: 30px;
    width: calc(100% - 250px);
    margin-left: 250px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.options {
    margin-bottom: 20px;
}

.option {
    margin-bottom: 15px;
}

.option label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.option input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.option.checkboxes label {
    display: inline-block;
    margin-right: 15px;
    cursor: pointer;
}

.option.checkboxes input[type="checkbox"] {
    margin-right: 5px;
}

.option-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.option-row .option {
    margin-bottom: 0;
}

.option-row .option label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.option-row .option input[type="number"],
.option-row .option input[type="text"] {
    width: 100px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* 特定输入框的宽度 */
#target-gb,
#ip-address {
    width: 200px;
}

#generate-btn, #calculate-btn, #calculate-subnet-btn {
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 36px;
    margin-top: 25px;
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

#generate-btn:hover, #calculate-btn:hover, #calculate-subnet-btn:hover {
    background-color: #0056b3;
}

.passwords-container, .calculator-results {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.passwords-container h2, .calculator-results h2 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 1.2rem;
}

#passwords-output {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    min-height: 50px;
    font-family: 'Courier New', Courier, monospace;
}

.password-item, .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

.password-item:last-child, .result-item:last-child {
    margin-bottom: 0;
}

.password-text, .result-label {
    color: #555;
    padding-right: 10px;
    border-right: 1px solid #eee;
}

.copy-btn {
    font-weight: bold;
    color: white;
    padding-left: 10px;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #0056b3;
}

.copied {
    background-color: #28a745 !important;
    color: white !important;
}

.error {
    color: red;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
}

.tool-section {
    margin-bottom: 40px;
    padding-top: 20px;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.tool-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.tool-card h3 {
    color: #2980b9;
    margin-bottom: 15px;
}

.ip-info p {
    margin: 10px 0;
    font-size: 16px;
}

.ip-location, .ip-isp {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
}

.ip-location::before {
    content: "📍";
    margin-right: 4px;
}

.ip-isp::before {
    content: "🏢";
    margin-right: 4px;
}

.password-generator .options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.length-control {
    margin: 15px 0;
    display: flex;
    gap: 20px;
}

.length-control label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.length-control input[type="number"] {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.result-area {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.result-area input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.result-area textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    resize: vertical;
}

button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 移动端样式 */
.mobile .container {
    padding: 10px;
}

.mobile .password-generator .options {
    grid-template-columns: 1fr;
}

.mobile .result-area {
    flex-direction: column;
}

.mobile .result-area button {
    width: 100%;
}

@media (max-width: 768px) {
    .nav-container {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100%;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-container.active {
        left: 0;
    }

    .container {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .sidebar {
        height: 100%;
        overflow-y: auto;
    }

    .sidebar h3 {
        font-size: 18px;
        padding: 15px;
        margin: 0;
    }

    .sidebar ul {
        padding: 0 15px;
    }

    .sidebar ul li a {
        padding: 12px 15px;
        font-size: 16px;
    }

    .sidebar-footer {
        position: relative;
        padding: 20px 15px;
        font-size: 13px;
    }

    .tool-section {
        margin-bottom: 30px;
    }

    .tool-section h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .calculator-intro {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .option-row {
        flex-direction: column;
        gap: 10px;
    }

    .option {
        width: 100%;
    }

    .option input[type="number"],
    .option input[type="text"] {
        width: 100%;
    }

    .bookmarks-container {
        grid-template-columns: 1fr;
    }

    .bookmark-category {
        margin-bottom: 15px;
    }

    .cmd-commands-container {
        grid-template-columns: 1fr;
    }

    .cmd-category {
        margin-bottom: 20px;
    }

    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #2c3e50;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background: white;
        margin: 5px 0;
        transition: 0.3s;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* 隐藏移动端菜单按钮（默认） */
.mobile-menu-btn {
    display: none;
}

.note {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    padding: 5px;
    background-color: #fff3cd;
    border-radius: 4px;
}

.storage-converter {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.converter-options {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.converter-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.converter-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.converter-input input {
    width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.converter-input select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.converter-arrow {
    font-size: 1.5rem;
    color: #666;
}

#storage-result {
    background-color: #f0f0f0;
}

.partition-calculator, .network-calculator {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.partition-calculator h2, .network-calculator h2 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.partition-calculator .calculator-options, .network-calculator .calculator-options {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.partition-calculator .calculator-row, .network-calculator .calculator-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.partition-calculator .calculator-input, .network-calculator .calculator-input {
    flex: 1;
}

.partition-calculator .calculator-input label, .network-calculator .calculator-input label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.partition-calculator .calculator-input input, .network-calculator .calculator-input input {
    width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#calculate-btn, #calculate-subnet-btn {
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 36px;
    margin-top: 25px;
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

#calculate-btn:hover, #calculate-subnet-btn:hover {
    background-color: #0056b3;
}

.partition-calculator .calculator-results, .network-calculator .calculator-results {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.partition-calculator .result-item, .network-calculator .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #fff;
}

.partition-calculator .result-item:last-child, .network-calculator .result-item:last-child {
    margin-bottom: 0;
}

.partition-calculator .result-label, .network-calculator .result-label {
    color: #555;
    padding-right: 10px;
    border-right: 1px solid #eee;
}

.partition-calculator .result-value, .network-calculator .result-value {
    font-weight: bold;
    color: #000;
    padding-left: 10px;
}

.calculator-intro {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

/* 移除旧的子网计算器样式 */
.subnet-calculator,
.subnet-calculator .calculator-input,
.subnet-calculator .calculator-input input[type="text"],
.subnet-calculator .calculator-input input[type="number"],
#calculate-subnet-btn {
    display: none;
}

.network-calculator .calculator-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.network-calculator .calculator-input {
    flex: 1;
}

.network-calculator .calculator-input input[type="text"] {
    width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.network-calculator .calculator-input input[type="number"] {
    width: 100px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#calculate-subnet-btn {
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 36px;
    margin-top: 25px;
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

#calculate-subnet-btn:hover {
    background-color: #0056b3;
}

#ms-settings .cmd-commands-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

#cmd-commands .cmd-commands-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.cmd-commands-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.cmd-category {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cmd-category h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #007bff;
}

.cmd-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.cmd-command:hover {
    background-color: #e9ecef;
}

.cmd-name {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #007bff;
    margin-right: 5px;
    min-width: 120px;
    text-decoration: none;
    cursor: pointer;
}

.cmd-name:hover {
    color: #0056b3;
    text-decoration: underline;
}

.cmd-desc {
    color: #666;
    margin-left: 15px;
    text-align: right;
    flex: 1;
}

.bookmarks-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.bookmark-category {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bookmark-category h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #007bff;
}

.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.bookmark-item:hover {
    background-color: #e9ecef;
}

.bookmark-name {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    margin-right: 15px;
}

.bookmark-name:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bookmark-desc {
    color: #666;
    margin-left: 20px;
    text-align: right;
    flex: 1;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background-color: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    border-top: 1px solid #34495e;
}

.sidebar-footer p {
    margin: 8px 0;
}

.sidebar-footer p:first-child {
    font-weight: bold;
    margin-bottom: 12px;
}

.footer-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #3498db;
    text-decoration: underline;
} 