/* Accenture Brand Colors */
:root {
    --accenture-purple: #A100FF;
    --accenture-dark-purple: #6B00A3;
    --accenture-light-purple: #C74EFF;
    --accenture-magenta: #E91E63;
    --accenture-gradient: linear-gradient(135deg, #6B00A3 0%, #A100FF 50%, #C74EFF 100%);
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-gray: #6C757D;
    --shadow-sm: 0 2px 8px rgba(107, 0, 163, 0.1);
    --shadow-md: 0 4px 16px rgba(107, 0, 163, 0.15);
    --shadow-lg: 0 8px 24px rgba(107, 0, 163, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Graphik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--accenture-gradient);
    color: white;
    padding: 60px 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-content {
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.control-group {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.control-group:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.label-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.label-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accenture-purple);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--accenture-purple), var(--accenture-light-purple));
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accenture-purple);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(107, 0, 163, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(107, 0, 163, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accenture-purple);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(107, 0, 163, 0.3);
    transition: all 0.2s ease;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 8px;
}

/* Regions Grid */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.region-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accenture-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.region-card:hover::before {
    transform: scaleX(1);
}

.region-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.region-card[data-region="americas"] {
    border-top: 4px solid var(--accenture-purple);
}

.region-card[data-region="apac"] {
    border-top: 4px solid var(--accenture-magenta);
}

.region-card[data-region="emea"] {
    border-top: 4px solid var(--accenture-light-purple);
}

.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.region-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.region-badge {
    background: var(--accenture-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Stats */
.stats {
    margin-bottom: 24px;
}

.stat-item {
    margin-bottom: 16px;
}

.stat-item.main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accenture-purple);
    transition: all 0.3s ease;
}

.stat-item.main .stat-value {
    font-size: 3rem;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

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

.stat-value.large {
    font-size: 2rem;
    font-weight: 700;
}

.stat-unit {
    font-size: 1.5rem;
    color: var(--text-gray);
    font-weight: 500;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 4px;
}

/* Visualization Container */
.visualization-container {
    margin: 20px 0 0 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(161, 0, 255, 0.05), rgba(199, 78, 255, 0.05));
    border-radius: 12px;
    position: relative;
    overflow: visible;
}

/* Animated Progress Bar */
.progress-wrapper {
    margin-bottom: 24px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
}

.progress-bar-container {
    height: 32px;
    background: rgba(161, 0, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accenture-gradient);
    border-radius: 16px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* City Skyline Visualization */
.skyline-container {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding: 0 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.building {
    flex: 1;
    min-width: 16px;
    background: var(--accenture-gradient);
    border-radius: 4px 4px 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(107, 0, 163, 0.3);
}

.building::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.building:hover {
    filter: brightness(1.2);
    transform: scaleY(1.05);
}

/* Energy Flow Particles */
.energy-flow {
    position: relative;
    height: 80px;
    background: radial-gradient(ellipse at center, rgba(161, 0, 255, 0.1) 0%, transparent 70%);
    border-radius: 8px;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accenture-purple);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accenture-light-purple);
    animation: floatParticle 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100%) scale(0.5);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100%) scale(1.5);
    }
}

/* Metric Cards Grid */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 0;
}

.metric-card {
    background: white;
    padding: 24px 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 160px;
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(107, 0, 163, 0.2);
}

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accenture-purple);
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: break-word;
    flex-shrink: 0;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Comparison */
.comparison {
    background: linear-gradient(135deg, rgba(161, 0, 255, 0.1), rgba(233, 30, 99, 0.1));
    padding: 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
    border-left: 4px solid var(--accenture-purple);
}

/* Summary Card */
.summary-card {
    background: var(--accenture-gradient);
    color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-top: 40px;
}

.summary-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.summary-item {
    text-align: center;
}

.summary-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .regions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 40px 24px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .controls-section {
        grid-template-columns: 1fr;
    }
    
    .regions-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .metric-card {
        min-height: 120px;
        padding: 20px 16px;
    }
    
    .metric-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .metric-value {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
    
    .metric-label {
        font-size: 0.75rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .stat-item.main .stat-value {
        font-size: 2.5rem;
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(161, 0, 255, 0.2);
    border-top-color: var(--accenture-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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