:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4caf50;
    --info-color: #2196f3;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

* {
    box-sizing: border-box;
}

.postcode-query-section {
    padding: 20px 0;
    min-height: 100vh;
    background: var(--background-gradient);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.calculator-title i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.calculator-main {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-inputs {
    margin-bottom: 20px;
}

.input-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.input-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.quick-search {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.quick-title {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-title i {
    color: #ff6b6b;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-tag {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--dark-color);
}

.quick-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

.calculator-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.result-header {
    margin-bottom: 20px;
}

.result-content {
    background: linear-gradient(135deg, #f8f9fa, #e8f4f8);
    border-radius: var(--border-radius);
    padding: 25px;
}

.address-display {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.address-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.address-icon i {
    font-size: 2rem;
    color: white;
}

.address-details {
    flex: 1;
}

.address-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.address-item:last-child {
    border-bottom: none;
}

.address-item.full-address {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    margin: 10px -15px -10px;
    padding: 15px;
    border-radius: 8px;
    border-bottom: none;
}

.address-label {
    font-weight: 600;
    color: var(--dark-color);
    min-width: 100px;
}

.address-value {
    color: #666;
}

.postcode-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.copy-section {
    margin-top: 20px;
    text-align: center;
}

.no-result {
    text-align: center;
    padding: 40px 20px;
}

.no-result-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 15px;
}

.no-result-text {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.no-result-hint {
    color: #999;
    font-size: 0.9rem;
}

.history-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.details-title {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-title i {
    color: var(--primary-color);
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.no-history {
    color: #999;
    font-size: 0.9rem;
}

.history-item {
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.history-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.calculator-info {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-title {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-title i {
    color: var(--primary-color);
}

.info-text {
    color: #666;
    line-height: 1.8;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    line-height: 1.6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: var(--dark-color);
}

.faq-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.faq-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-title i {
    color: var(--primary-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: #f0f0f0;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--primary-color);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 18px 20px;
    color: #666;
    line-height: 1.7;
    display: none;
}

.faq-answer.show {
    display: block;
}

.related-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
}

.related-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.related-title i {
    color: var(--primary-color);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.related-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
}

.related-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.related-item:hover i {
    color: white;
}

@media (max-width: 768px) {
    .calculator-title {
        font-size: 1.8rem;
    }

    .calculator-header {
        padding: 25px 15px;
    }

    .calculator-main {
        padding: 20px 15px;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .address-display {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .address-item {
        flex-direction: column;
        gap: 5px;
    }

    .address-item.full-address {
        margin: 15px -5px -5px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-results.show {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.postcode-value.highlight {
    animation: pulse 0.3s ease;
}