/* Main Container */
.cbc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Cards */
.cbc-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.1);
    border: 1px solid rgba(106, 13, 173, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cbc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(106, 13, 173, 0.15);
}

/* Glassmorphism Effect */
.cbc-glassmorphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(106, 13, 173, 0.2);
}

/* Typography */
.cbc-title {
    color: #6A0DAD;
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.cbc-card h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #B19CD9;
}

/* Form Grid */
.cbc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.cbc-input-group {
    display: flex;
    flex-direction: column;
}

.cbc-full-width {
    grid-column: 1 / -1;
}

.cbc-input-group label {
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbc-input-group input,
.cbc-input-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.cbc-input-group input:focus,
.cbc-input-group select:focus {
    outline: none;
    border-color: #6A0DAD;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

/* Unit Toggle */
.cbc-weight-group {
    position: relative;
}

.cbc-unit-toggle {
    position: absolute;
    right: 10px;
    top: 35px;
    display: flex;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 2px;
    z-index: 1;
}

.cbc-unit-btn {
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.3s ease;
    color: #666;
}

.cbc-unit-btn.active {
    background: #6A0DAD;
    color: white;
}

/* Calculate Button */
.cbc-calculate-btn {
    background: linear-gradient(135deg, #6A0DAD 0%, #8A2BE2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cbc-calculate-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(106, 13, 173, 0.3);
}

.cbc-calculate-btn:active {
    transform: scale(0.98);
}

.cbc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.cbc-results-section {
    margin-top: 30px;
}

/* Circular Progress */
.cbc-circular-progress {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.cbc-progress-circle {
    transform: rotate(-90deg);
}

.cbc-progress-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 10;
}

.cbc-progress-fill {
    fill: none;
    stroke: #6A0DAD;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.cbc-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cbc-progress-text .cbc-calories-burned {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #6A0DAD;
    line-height: 1;
}

.cbc-progress-text span:last-child {
    font-size: 1rem;
    color: #666;
}

/* Metrics Grid */
.cbc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.cbc-metric {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.cbc-metric-label {
    display: block;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.cbc-metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #6A0DAD;
}

/* Comparison Bar */
.cbc-comparison-bar {
    margin-top: 20px;
}

.cbc-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.cbc-bar-container {
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.cbc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6A0DAD, #B19CD9);
    transition: width 1s ease;
    border-radius: 10px;
}

/* Impact Grid */
.cbc-impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.cbc-impact-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.cbc-impact-label {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.cbc-impact-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6A0DAD;
}

/* Breakdown Grid */
.cbc-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.cbc-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cbc-breakdown-item span:first-child {
    color: #666;
}

.cbc-breakdown-item span:last-child {
    font-weight: 600;
    color: #6A0DAD;
}

/* Intensity Indicator */
.cbc-intensity-indicator {
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.cbc-intensity-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #F44336);
    transition: width 0.5s ease;
}

/* Additional Metrics */
.cbc-metrics-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.cbc-metric-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
}

.cbc-metric-icon {
    font-size: 1.5rem;
}

/* Smart Guide */
.cbc-guide-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #6A0DAD;
}

.cbc-guide-content ul {
    margin: 0;
    padding-left: 20px;
}

.cbc-guide-content li {
    margin-bottom: 8px;
    color: #555;
}

/* Social Sharing */
.cbc-social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.cbc-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.cbc-whatsapp { background: #25D366; }
.cbc-facebook { background: #1877F2; }
.cbc-twitter { background: #1DA1F2; }
.cbc-telegram { background: #0088cc; }
.cbc-linkedin { background: #0077B5; }
.cbc-copy-link { background: #6A0DAD; }

.cbc-social-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Premium Features */
.cbc-premium-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px dashed #B19CD9;
}

.cbc-premium-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cbc-premium-badge {
    background: linear-gradient(135deg, #6A0DAD, #B19CD9);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cbc-premium-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.cbc-premium-btn {
    padding: 12px;
    border: 2px solid #6A0DAD;
    background: transparent;
    color: #6A0DAD;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cbc-premium-btn:hover {
    background: #6A0DAD;
    color: white;
}

/* Dark Mode Toggle */
.cbc-dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.cbc-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.cbc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cbc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.cbc-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cbc-slider {
    background-color: #6A0DAD;
}

input:checked + .cbc-slider:before {
    transform: translateX(26px);
}

/* Dark Mode Styles */
body.cbc-dark-mode {
    background: #1a1a1a;
}

body.cbc-dark-mode .cbc-card {
    background: #2d2d2d;
    border-color: #6A0DAD;
}

body.cbc-dark-mode .cbc-card h3 {
    color: #B19CD9;
    border-bottom-color: #6A0DAD;
}

body.cbc-dark-mode .cbc-input-group input,
body.cbc-dark-mode .cbc-input-group select {
    background: #3d3d3d;
    border-color: #6A0DAD;
    color: #fff;
}

body.cbc-dark-mode .cbc-input-group label {
    color: #B19CD9;
}

body.cbc-dark-mode .cbc-metric {
    background: #3d3d3d;
}

body.cbc-dark-mode .cbc-metric-label {
    color: #B19CD9;
}

/* FAQ Section */
.cbc-faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.cbc-faq-question {
    font-weight: 600;
    color: #6A0DAD;
    cursor: pointer;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cbc-faq-question:hover {
    background: #B19CD9;
    color: white;
}

.cbc-faq-question.active {
    background: #6A0DAD;
    color: white;
}

.cbc-faq-answer {
    display: none;
    padding: 15px;
    color: #666;
    line-height: 1.6;
}

/* Disclaimer */
.cbc-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    color: #856404;
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbc-container {
        padding: 10px;
    }
    
    .cbc-form-grid {
        grid-template-columns: 1fr;
    }
    
    .cbc-metrics-grid,
    .cbc-impact-grid,
    .cbc-premium-buttons {
        grid-template-columns: 1fr;
    }
    
    .cbc-social-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cbc-title {
        font-size: 1.5rem;
    }
    
    .cbc-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cbc-social-buttons {
        grid-template-columns: 1fr;
    }
    
    .cbc-premium-buttons {
        grid-template-columns: 1fr;
    }
}

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

.cbc-card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.cbc-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.cbc-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6A0DAD;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Add to existing style.css */

/* Error State */
.cbc-input-group.cbc-error input,
.cbc-input-group.cbc-error select {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Notification System */
.cbc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

.cbc-notification.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.cbc-notification.success {
    background: linear-gradient(135deg, #28a745, #218838);
}

.cbc-notification.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Input focus styles */
.cbc-input-group input:focus,
.cbc-input-group select:focus {
    outline: none;
    border-color: #6A0DAD;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.2);
}

/* Placeholder styling */
.cbc-input-group input::placeholder {
    color: #999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cbc-input-group input:focus::placeholder {
    opacity: 0.5;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Results section highlight on new calculation */
.cbc-results-section {
    transition: all 0.3s ease;
}

.cbc-results-section.highlight {
    box-shadow: 0 0 0 3px #6A0DAD;
}

/* Tooltip styles */
[title] {
    position: relative;
    cursor: help;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: #6A0DAD;
    color: white;
    font-size: 12px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Loading spinner enhancement */
.cbc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button loading state */
.cbc-calculate-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .cbc-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        text-align: center;
    }
    
    [title]:hover::after {
        display: none; /* Hide tooltips on mobile */
    }
}

/* Print styles */
@media print {
    .cbc-social-buttons,
    .cbc-premium-card,
    .cbc-dark-mode-toggle,
    .cbc-calculate-btn {
        display: none !important;
    }
    
    .cbc-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}