* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e88e5;
    text-decoration: none;
}

.slogan {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1e88e5;
}

.hero {
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.tools-section {
    padding: 4rem 0;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e88e5;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
}

footer {
    background-color: #333;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.page-content {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.page-content h1 {
    color: #1e88e5;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.page-content h2 {
    color: #333;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.tool-container {
    max-width: 1400px;
    margin: 2rem auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    color: #1e88e5;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: #666;
}

.tool-content {
    margin-top: 2rem;
}

.tab-container {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #1e88e5;
}

.tab-btn.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-area {
    margin-bottom: 2rem;
}

.input-area label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-area input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.input-area input[type="file"]:hover {
    border-color: #1e88e5;
}

.input-area textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 200px;
    font-family: inherit;
}

.input-area input[type="text"],
.input-area input[type="number"],
.input-area select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.input-area input:focus,
.input-area textarea:focus,
.input-area select:focus {
    outline: none;
    border-color: #1e88e5;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #1e88e5;
    color: white;
}

.btn-primary:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.result-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-area h3 {
    color: #333;
    margin-bottom: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e88e5;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.qrcode-container {
    text-align: center;
    padding: 2rem;
}

.qrcode {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calculator {
    max-width: 400px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 1.5rem;
}

.calculator-display {
    background: #333;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: right;
    font-size: 1.5rem;
    min-height: 60px;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    background: white;
    transition: all 0.3s;
}

.calc-btn:hover {
    background: #e0e0e0;
}

.calc-btn.operator {
    background: #1e88e5;
    color: white;
}

.calc-btn.operator:hover {
    background: #1976d2;
}

.calc-btn.equals {
    background: #4caf50;
    color: white;
    grid-column: span 2;
}

.calc-btn.equals:hover {
    background: #43a047;
}

.calc-btn.clear {
    background: #f44336;
    color: white;
    grid-column: span 2;
}

.calc-btn.clear:hover {
    background: #d32f2f;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .calculator-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .tools-section {
        padding: 2rem 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}