:root {
    --primary: #00A388; /* Emerald green */
    --primary-dark: #007663;
    --secondary: #1F2937; /* Dark slate */
    --accent: #F59E0B; /* Amber/Yellow for highlights */
    --bg-gradient-1: #0F172A;
    --bg-gradient-2: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --card-bg: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: floating 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #00A388;
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #4F46E5; /* Indigo */
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes floating {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(45deg); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.logo-e {
    color: var(--primary);
    font-size: 3rem;
}

.logo-light {
    font-weight: 300;
    color: var(--text-muted);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Base Glass Panel Style */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

input, select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 163, 136, 0.2);
}

/* Select element styling options */
select option {
    background-color: var(--secondary);
    color: var(--text-main);
}

.input-with-currency {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-currency input {
    padding-right: 4rem;
}

.currency {
    position: absolute;
    right: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 163, 136, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 163, 136, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Result Section */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.val-card .card-amount { color: #fff; }
.tax-card .card-amount { color: #F87171; } /* Red for taxes */
.duty-card .card-amount { color: #F87171; }
.fee-card .card-amount { color: #FBBF24; } /* Amber for fees */

.total-section, .grand-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 1rem;
}

.total-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #F87171;
}

.grand-total-section {
    background: rgba(0, 163, 136, 0.1);
    border: 1px solid rgba(0, 163, 136, 0.3);
}

.grand-total-amount {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    margin-top: 1rem;
}

/* API Documentation */
.api-doc-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.code-block {
    background: #0F172A;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: monospace;
}

.method {
    color: var(--accent);
    font-weight: bold;
}

.endpoint {
    color: #A78BFA;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
}

code {
    font-family: monospace;
    color: #E2E8F0;
    font-size: 0.95rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Loading animation for button */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.error-text {
    color: #EF4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    .glass-panel { padding: 1.5rem; }
    .total-section, .grand-total-section { 
        flex-direction: column; 
        gap: 0.5rem; 
        align-items: flex-start;
    }
}
