* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f;
    color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    word-wrap: break-word;
}

header {
    background: #2a2a40;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.site-name {
    color: #00ffcc;
    margin: 0;
    font-size: 24px;
    text-decoration: none;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #00ffcc;
    text-decoration: underline;
}

.nav-primary {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-auth {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        width: 100%;
    }
    
    .nav-primary, .nav-auth {
        width: 100%;
        justify-content: flex-start;
    }
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: #2a2a40;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    word-wrap: break-word;
}

h1 {
    color: #00ffcc;
    text-align: center;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.subtitle {
    text-align: center;
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.subtitle-small {
    text-align: center;
    color: #cccccc;
    font-size: 0.9em;
    margin-bottom: 30px;
}

.calculator-section {
    margin: 30px 0;
}

.calculator-section h2 {
    color: #00ffcc;
    text-align: center;
    margin-bottom: 20px;
}

.calculator-box {
    background: #1e1e2f;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.units-input {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    text-align: center;
    background: #2a2a40;
    border: 2px solid #00ffcc;
    border-radius: 5px;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
}

.units-input:focus {
    outline: none;
    border-color: #00e6b8;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.keypad-btn {
    padding: 20px;
    font-size: 20px;
    background: #2a2a40;
    border: 2px solid #00ffcc;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.keypad-btn:hover {
    background: #00ffcc;
    color: #1e1e2f;
    transform: scale(1.05);
}

.keypad-btn:active {
    transform: scale(0.95);
}

.keypad-btn.backspace {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.keypad-btn.backspace:hover {
    background: #ff5252;
    color: #ffffff;
}

.keypad-btn.clear {
    background: #ffa726;
    border-color: #ffa726;
    grid-column: span 2;
}

.keypad-btn.clear:hover {
    background: #ff9800;
    color: #ffffff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background: #00ffcc;
    color: #1e1e2f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #00e6b8;
}

.result-section {
    margin: 30px 0;
}

.result-section h2 {
    color: #00ffcc;
    text-align: center;
    margin-bottom: 20px;
}

.result-box {
    background: #1e1e2f;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #444;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.total {
    border-top: 2px solid #00ffcc;
    margin-top: 15px;
    padding-top: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.result-label {
    color: #ffffff;
}

.result-value {
    color: #00ffcc;
    font-weight: bold;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
    font-size: 0.95em;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.content-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #444;
}

.content-section h2 {
    color: #00ffcc;
    margin: 20px 0 15px 0;
}

.content-section h3 {
    color: #00ffcc;
    margin: 15px 0 10px 0;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.content-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.tariff-table-section {
    margin: 30px 0;
    overflow-x: auto;
}

.tariff-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e2f;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    overflow: hidden;
}

.tariff-table thead {
    background: #00ffcc;
    color: #1e1e2f;
}

.tariff-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.tariff-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    color: #ffffff;
}

.tariff-table tbody tr:hover {
    background: #2a2a40;
}

.tariff-table tbody tr:last-child td {
    border-bottom: none;
}

footer {
    background-color: #1e1e2f;
    color: white;
    text-align: center;
    padding: 1em 0;
    position: relative;
    bottom: 0;
    width: 100%;
    overflow-x: hidden;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #00ffcc;
    text-decoration: underline;
}

.footer-copyright {
    color: #ffffff;
    font-size: 14px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .calculator-box {
        padding: 20px;
    }

    .keypad-btn {
        padding: 15px;
        font-size: 18px;
    }

    .tariff-table {
        font-size: 0.9em;
    }

    .tariff-table th,
    .tariff-table td {
        padding: 8px;
    }
}

