* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin-right: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    object-fit: contain;
}

.logo span {
    font-size: 20px;
    font-weight: bold;
}

.main-nav {
    flex: 1;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s;
    display: block;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.main-nav a:hover {
    background-color: #f0f2f5;
}

.main-nav a.active {
    background-color: #007bff;
    color: #fff;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

.calculator {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 2rem;
}

.display {
    margin-bottom: 1rem;
}

#display {
    width: 100%;
    height: 60px;
    font-size: 24px;
    text-align: right;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

button {
    padding: 1rem;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e9ecef;
}

button:active {
    background-color: #dee2e6;
}

.content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #333;
    margin: 1.5rem 0 1rem;
}

h3 {
    color: #444;
    margin: 1rem 0;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer Styles */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    .logo a {
        justify-content: center;
        margin-right: 0;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
        max-width: none;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .logo span {
        font-size: 18px;
    }

    .logo img {
        height: 32px;
    }

    .main-nav a {
        font-size: 13px;
        padding: 0.5rem;
    }
}

@media (max-width: 600px) {
    .buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    button {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    #display {
        height: 50px;
        font-size: 20px;
    }
}

/* Fraction Calculator Styles */
.fraction-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.fraction input {
    width: 80px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.fraction hr {
    width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid #ddd;
}

.operator select {
    width: 60px;
    height: 40px;
    font-size: 18px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 18px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calculate-btn:hover {
    background-color: #0056b3;
}

.result {
    margin-top: 1rem;
    text-align: center;
}

.fraction-result {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.fraction-result .fraction {
    font-size: 24px;
}

.fraction-result .fraction hr {
    margin: 0.5rem 0;
}

@media (max-width: 600px) {
    .fraction-inputs {
        flex-direction: column;
        gap: 1rem;
    }

    .operator select {
        width: 100%;
    }

    .fraction input {
        width: 100%;
    }
}

/* Percentage Calculator Styles */
.percentage-calculator {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.calc-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.calc-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
}

.calc-section .calculate-btn {
    width: 100%;
    margin-top: 1rem;
}

.calc-section .result {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.calc-section .result p {
    margin: 0;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .percentage-calculator {
        grid-template-columns: 1fr;
    }
}

/* Geometry Calculator Styles */
.geometry-calculator {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Statistics Calculator Styles */
.statistics-calculator {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
}

.statistics-calculator textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 100px;
}

.statistics-calculator textarea:focus {
    outline: none;
    border-color: #007bff;
}

.result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.result-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.result-item p {
    margin: 0;
    font-size: 1.2rem;
    color: #007bff;
}

@media (max-width: 768px) {
    .geometry-calculator {
        grid-template-columns: 1fr;
    }
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: #45a049;
}

.contact-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.contact-info h2 {
    margin-bottom: 15px;
    color: #333;
}

.contact-info p {
    margin-bottom: 10px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-form {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }
}

/* Styles untuk Result Box */
.result-box {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-box.error {
    background-color: #fff3f3;
    border-left: 4px solid #dc3545;
    color: #dc3545;
}

.result-primary {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.result-secondary {
    font-size: 1em;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

.result-secondary p {
    margin: 5px 0;
}

/* Styles untuk BMI Calculator */
.intro-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .calculator {
        grid-template-columns: 1fr;
    }
}

.calculator-form {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bmi-chart {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.info-table th,
.info-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.info-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.result-tips {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.result-tips ul {
    margin: 10px 0;
    padding-left: 20px;
}

.result-tips li {
    margin: 5px 0;
}

.warning-note {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.warning-note h3 {
    color: #856404;
    margin-top: 0;
}

.warning-note ul {
    margin: 10px 0;
    padding-left: 20px;
}

.warning-note li {
    color: #856404;
    margin: 5px 0;
} 