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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

.presentation-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.slide {
    min-height: 100vh;
    display: none;
    background: white;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 60px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.slide.active {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.6s ease-out;
}

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

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800, #E91E63);
}

/* FIXED SLIDE HEADER - Reduced spacing */
.slide-header {
    position: absolute;
    top: 40px;
    left: 60px;
    right: 60px;
    z-index: 10;
    background: white;
}

.slide-content {
    margin-top: 80px; /* Reduced from 120px to eliminate empty space */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to start */
    padding-bottom: 100px; /* Space for navigation */
}

h1 {
    color: #2c3e50;
    font-size: 2.8em;
    margin-bottom: 10px; /* Reduced spacing */
    text-align: center;
    font-weight: 300;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Reduced spacing */
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

h2 {
    color: #34495e;
    font-size: 2.2em;
    margin-bottom: 10px; /* Reduced spacing */
    border-bottom: 3px solid #3498db;
    padding-bottom: 5px; /* Reduced spacing */
    display: inline-block;
}

h3 {
    color: #2980b9;
    font-size: 1.6em;
    margin: 15px 0 10px 0; /* Reduced spacing */
}

.subtitle {
    font-size: 1.3em;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 15px; /* Reduced spacing */
    font-weight: 300;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px; /* Reduced spacing */
    align-items: start; /* Align items to start to fix partition alignment */
}

.content-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.content-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.content-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.icon {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: #3498db;
    transition: transform 0.3s ease;
}

.content-card:hover .icon {
    transform: scale(1.1);
}

ul {
    list-style: none;
    margin: 15px 0; /* Reduced spacing */
}

li {
    margin: 10px 0; /* Reduced spacing */
    padding-left: 30px;
    position: relative;
    line-height: 1.6; /* Slightly reduced line height */
}

li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.3em;
}

.highlight-box {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    padding: 25px; /* Reduced padding */
    border-radius: 15px;
    margin: 20px 0; /* Reduced spacing */
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* CHART CONTAINER - Fixed height and alignment */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px; /* Reduced padding */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 15px 0; /* Reduced spacing */
    position: relative;
    overflow: hidden;
    height: 380px; /* Slightly reduced height */
    max-height: 380px;
    align-self: start; /* Fix alignment with other partitions */
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
}

.chart-title {
    font-size: 1.4em; /* Slightly smaller */
    color: #2c3e50;
    margin-bottom: 15px; /* Reduced spacing */
    text-align: center;
    font-weight: 500;
}

/* Chart canvas specific styling */
#performanceChart {
    max-height: 280px !important; /* Reduced height */
    width: 100% !important;
    height: 280px !important;
}

/* IMAGE CHART CONTAINER - Better sizing */
.image-chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px; /* Reduced padding */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 15px 0; /* Reduced spacing */
    position: relative;
    overflow: hidden;
    max-height: 500px;
}

.image-chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.image-placeholder {
    min-height: 280px; /* Reduced height */
    max-height: 350px; /* Reduced max height */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 0px dashed #bdc3c7;
    border-radius: 10px;
    margin-top: 15px; /* Reduced spacing */
    overflow: hidden;
}

.placeholder-content {
    text-align: center;
    color: #7f8c8d;
}

.placeholder-icon {
    font-size: 3.5em; /* Slightly reduced */
    margin-bottom: 15px; /* Reduced spacing */
}

/* Image sizing */
.image-placeholder img {
    max-width: 100% !important;
    max-height: 320px !important; /* Reduced max height */
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* TABLE STYLES */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 25px; /* Reduced padding */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 15px 0; /* Reduced spacing */
    overflow: hidden;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    border-radius: 10px;
    overflow: hidden;
    min-width: 600px;
}

.modern-table thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white;
}

.modern-table th {
    padding: 12px 15px; /* Reduced padding */
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
    background: inherit;
}

.modern-table td {
    padding: 10px 15px; /* Reduced padding */
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.modern-table tbody tr:hover {
    background: #f8f9fa !important;
    transform: scale(1.01);
}

.modern-table tbody tr:nth-child(even) {
    background: #fafafa !important;
}

/* STATUS INDICATORS */
.status-success {
    background: #27ae60 !important;
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

.status-warning {
    background: #f39c12 !important;
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

.status-danger {
    background: #e74c3c !important;
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

/* NAVIGATION */
.navigation {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex;
    gap: 15px;
    z-index: 1000;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* FULLSCREEN CONTROLS */
.fullscreen-controls {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 1001 !important;
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    color: white !important;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.nav-btn:hover::before {
    width: 300px;
    height: 300px;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

.nav-btn:disabled {
    background: #bdc3c7 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fullscreen-btn {
    padding: 12px !important;
    background: linear-gradient(135deg, #27ae60, #2d8659) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.slide-counter {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #7f8c8d;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 20;
}

/* PRIORITY CLASSES */
.priority-high { 
    border-left-color: #e74c3c !important;
    background: linear-gradient(135deg, #fff5f5, #f8f9fa) !important;
}

.priority-medium { 
    border-left-color: #f39c12 !important;
    background: linear-gradient(135deg, #fefcf3, #f8f9fa) !important;
}

.priority-low { 
    border-left-color: #27ae60 !important;
    background: linear-gradient(135deg, #f0fff4, #f8f9fa) !important;
}

.timeline {
    display: flex;
    justify-content: space-between;
    margin: 25px 0; /* Reduced spacing */
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
    z-index: 0;
}

.timeline-item {
    text-align: center;
    flex: 1;
    padding: 18px; /* Reduced padding */
    background: white;
    margin: 0 5px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.timeline-item h4 {
    color: #2c3e50;
    margin-bottom: 8px; /* Reduced spacing */
    font-size: 1.2em;
}

/* Presentation Mode Styles */
.presentation-container.presentation-mode {
    max-width: 100%;
    margin: 0;
}

.presentation-container.presentation-mode .slide {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 40px;
}

.presentation-container.presentation-mode .slide-header {
    top: 20px;
    left: 40px;
    right: 40px;
}

.presentation-container.presentation-mode .slide-content {
    margin-top: 80px; /* Reduced for presentation mode too */
}

.presentation-active {
    overflow: hidden;
}

.presentation-active .navigation {
    background: rgba(0,0,0,0.8) !important;
}

.presentation-active .fullscreen-controls {
    background: rgba(0,0,0,0.8) !important;
    border-radius: 15px;
    padding: 10px;
}

/* ENHANCED MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .slide {
        padding: 20px 15px; /* Reduced mobile padding */
        margin: 5px; /* Reduced mobile margin */
        min-height: calc(100vh - 10px); /* Account for reduced margin */
    }

    .slide-header {
        left: 15px;
        right: 15px;
        top: 15px; /* Reduced top spacing */
    }

    .slide-content {
        margin-top: 70px; /* Reduced mobile header spacing */
        padding-bottom: 120px; /* More space for mobile navigation */
    }

    .content-grid,
    .content-grid.two-col,
    .content-grid.three-col {
        grid-template-columns: 1fr;
        gap: 15px; /* Reduced mobile gap */
        margin-top: 15px; /* Reduced mobile spacing */
    }

    h1 { 
        font-size: 2em; /* Reduced mobile font size */
        margin-bottom: 8px;
    }
    
    h2 { 
        font-size: 1.6em; /* Reduced mobile font size */
        margin-bottom: 8px;
    }
    
    h3 {
        font-size: 1.3em; /* Reduced mobile font size */
        margin: 12px 0 8px 0;
    }

    .subtitle {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .content-card {
        padding: 20px; /* Reduced mobile padding */
    }

    .icon {
        font-size: 2.2em; /* Reduced mobile icon size */
        margin-bottom: 12px;
    }

    .highlight-box {
        padding: 20px; /* Reduced mobile padding */
        margin: 15px 0; /* Reduced mobile spacing */
    }
    
    .navigation {
        flex-wrap: wrap;
        justify-content: center;
        bottom: 15px !important; /* Closer to bottom on mobile */
        padding: 8px 15px;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90%; /* Prevent overflow */
    }

    .fullscreen-controls {
        bottom: 15px !important; /* Closer to bottom on mobile */
        right: 15px !important;
    }

    .nav-btn {
        padding: 10px 20px; /* Reduced mobile button padding */
        font-size: 14px; /* Reduced mobile font size */
    }

    .fullscreen-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 16px; /* Reduced mobile font size */
    }

    .timeline {
        flex-direction: column;
        gap: 12px; /* Reduced mobile gap */
        margin: 20px 0; /* Reduced mobile spacing */
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        padding: 15px; /* Reduced mobile padding */
        margin: 0;
    }

    /* Modify the existing chart container CSS */
    .chart-container {
        height: 0px;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .chart-placeholder {
        height: 200px; /* Maintain the layout height */
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }
    #performanceChart {
        max-height: 220px !important; /* Reduced mobile chart height */
        height: 220px !important;
    }

    .chart-title {
        font-size: 1.2em; /* Reduced mobile font size */
        margin-bottom: 10px;
    }

    .table-container {
        padding: 15px; /* Reduced mobile padding */
        margin: 10px 0;
    }

    .modern-table {
        font-size: 0.85em; /* Reduced mobile font size */
        min-width: 500px; /* Reduced minimum width */
    }

    .modern-table th,
    .modern-table td {
        padding: 8px 6px; /* Reduced mobile cell padding */
    }

    .image-chart-container {
        padding: 15px; /* Reduced mobile padding */
        max-height: 400px; /* Reduced mobile height */
    }

    .image-placeholder {
        min-height: 180px; /* Reduced mobile height */
        max-height: 250px; /* Reduced mobile max height */
    }

    .placeholder-icon {
        font-size: 2.5em; /* Reduced mobile icon size */
        margin-bottom: 10px;
    }

    .image-placeholder img {
        max-height: 200px !important; /* Reduced mobile image height */
    }

    .slide-counter {
        top: 15px;
        right: 15px;
        font-size: 12px; /* Reduced mobile font size */
        padding: 6px 12px; /* Reduced mobile padding */
    }

    /* Mobile-specific content adjustments */
    li {
        margin: 8px 0; /* Reduced mobile list spacing */
        line-height: 1.5;
    }

    ul {
        margin: 12px 0; /* Reduced mobile list margin */
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .slide {
        padding: 15px 10px;
        margin: 2px;
    }

    .slide-header {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .slide-content {
        margin-top: 65px;
        padding-bottom: 140px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    .content-grid {
        gap: 12px;
        margin-top: 12px;
    }

    .content-card {
        padding: 15px;
    }

    .navigation {
        bottom: 10px !important;
        padding: 6px 12px;
        gap: 10px;
    }

    .fullscreen-controls {
        bottom: 10px !important;
        right: 10px !important;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .fullscreen-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px;
    }
}