/* GST Calculator Professional CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --purple-color: #a855f7;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --lighter-gray: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 60px;
}

/* Navigation - Use responsive global styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* GST Container */
.gst-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.gst-header {
    text-align: center;
    margin-bottom: 40px;
}

.gst-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.gst-header p {
    font-size: 16px;
    color: var(--gray);
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header .icon {
    font-size: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.card-content {
    padding: 20px;
}

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mode-btn {
    padding: 15px;
    background: var(--lighter-gray);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mode-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-gray);
}

.mode-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: var(--primary-color);
    color: var(--dark);
}

.mode-icon {
    font-size: 24px;
}

.mode-text {
    font-weight: 600;
    font-size: 14px;
}

.mode-desc {
    font-size: 12px;
    opacity: 0.8;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: var(--gray);
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    padding-left: 35px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#customRate {
    padding-left: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Rate Buttons */
.rate-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.rate-btn {
    padding: 12px 8px;
    background: var(--lighter-gray);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--dark);
}

.rate-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-gray);
}

.rate-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark);
}

.rate-label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.8;
}

/* Results Card */
.results-card .card-content {
    padding: 25px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.result-label {
    font-size: 14px;
    color: var(--gray);
}

.result-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.result-value.green {
    color: var(--success-color);
}

.result-value.purple {
    color: var(--purple-color);
}

.total-gst {
    padding-top: 20px;
}

.final-amount {
    background: var(--lighter-gray);
    margin: 20px -25px -25px;
    padding: 20px 25px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: none;
}

.result-value.large {
    font-size: 32px;
    font-weight: 700;
}

/* Rate Guide */
.rate-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--lighter-gray);
    border-radius: 8px;
}

.guide-rate {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.guide-desc {
    font-size: 13px;
    color: var(--gray);
}

/* Tax Distribution */
.tax-distribution {
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #cdd2fe 100%);
    border-radius: 12px;
    text-align: center;
}

.distribution-type {
    margin-bottom: 10px;
}

.distribution-type strong {
    font-size: 16px;
    color: var(--primary-color);
}

.distribution-type p {
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
}

.distribution-info {
    font-size: 13px;
    color: var(--gray);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-icon {
    font-size: 18px;
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--dark);
}

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

.btn-success {
    background: var(--success-color);
    color: var(--dark);
}

.btn-success:hover {
    background: #059669;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 968px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    
    .gst-header h1 {
        font-size: 28px;
    }
    
    .mode-selector {
        grid-template-columns: 1fr;
    }
    
    .rate-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .result-value.large {
        font-size: 24px;
    }
}

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

.card {
    animation: fadeIn 0.5s ease;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}