/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f8fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Main content styles */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 1fr 1fr;
    }

    .tax-info {
        grid-column: 1 / -1;
    }
}

/* Calculator form styles */
.calculator {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
}

.input-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Period selector styles */
.period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.period-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    background-color: #e0e0e0;
}

.period-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Button styles */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

button[type="button"] {
    background-color: #2ecc71;
    color: white;
}

button[type="button"]:hover {
    background-color: #27ae60;
}

button[type="reset"] {
    background-color: #e0e0e0;
    color: #333;
}

button[type="reset"]:hover {
    background-color: #d0d0d0;
}

/* Result section styles */
.result {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.result h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.result-content {
    font-size: 1.1rem;
}

.result-content p {
    margin-bottom: 10px;
}

.result-content .highlight {
    color: #e74c3c;
    font-weight: 600;
}

.result-content .total {
    font-size: 1.3rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eaeaea;
}

/* Tax info styles */
.tax-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.tax-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.tax-info h3 {
    color: #2c3e50;
    margin: 25px 0 15px;
}

.tax-info p {
    margin-bottom: 10px;
}

/* Tax table styles */
.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tax-table th,
.tax-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.tax-table th {
    background-color: #f5f8fa;
    font-weight: 600;
}

.tax-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tax-table tr:hover {
    background-color: #f0f7fd;
}

/* Footer styles */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: #7f8c8d;
    border-top: 1px solid #eaeaea;
}

/* ICP registration styling */
.beian {
    margin-top: 10px;
    font-size: 0.9rem;
}

.beian a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
}

.beian a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Friendly links styling */
.friendly-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #eaeaea;
}

.friendly-links h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    max-width: 1000px;
}

.links-container a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.3s;
}

.links-container a:hover {
    background-color: #3498db;
    color: white;
}