* {
    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%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
    transition: all 0.3s ease;
}

.controls-panel.sticky {
    position: fixed;
    top: 10px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    max-width: 1360px;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.controls-panel.sticky .control-row {
    gap: 15px;
    flex-wrap: nowrap;
    align-items: center;
}

.controls-panel.sticky .model-selector {
    flex-shrink: 0;
}

.controls-panel.sticky .model-selector label {
    font-size: 12px;
    margin-bottom: 4px;
}

.controls-panel.sticky .date-selector {
    flex-shrink: 0;
    display: flex;
    align-items: end;
    gap: 10px;
    flex-direction: row;
}

.controls-panel.sticky .input-group label {
    font-size: 12px;
    margin-bottom: 4px;
}

.controls-panel.sticky .model-buttons {
    gap: 6px;
}

.controls-panel.sticky .model-btn {
    padding: 8px 14px;
    font-size: 13px;
}

.controls-panel.sticky .date-controls {
    gap: 2px;
}

.controls-panel.sticky .date-nav-btn {
    padding: 8px 6px;
    min-width: 32px;
}

.controls-panel.sticky .date-input {
    padding: 8px 10px;
    font-size: 13px;
}

.controls-panel.sticky .load-btn {
    padding: 8px 16px;
    font-size: 13px;
    margin: 0;
    flex-shrink: 0;
}

.controls-placeholder {
    height: 0;
    transition: height 0.3s ease;
}

.controls-placeholder.active {
    height: 50px; /* Single row horizontal layout */
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: end;
}

.model-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.model-selector label {
    font-weight: 600;
    color: #555;
}

.model-buttons {
    display: flex;
    gap: 10px;
}

.model-btn {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.model-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #333;
}

.model-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.date-selector {
    display: flex;
    gap: 15px;
    align-items: end;
}

.controls-panel.sticky .date-selector {
    order: 2;
    flex: 1;
    min-width: 200px;
    gap: 8px;
}

.controls-panel.sticky {
    left: 10px;
    right: 10px;
    top: 5px;
    padding: 10px 15px;
    border-radius: 10px;
}

.controls-panel.sticky .control-row {
    gap: 10px;
    flex-wrap: wrap;
}

.controls-panel.sticky .model-selector {
    order: 1;
}

.controls-panel.sticky .load-btn {
    padding: 6px 12px;
    font-size: 12px;
    align-self: flex-start;
    margin-top: 5px;
}

.controls-panel.sticky .model-btn {
    padding: 6px 10px;
    font-size: 12px;
}

.controls-placeholder.active {
    height: 90px;
}

.product-selector {
    min-width: auto;
}

.product-selector label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.product-select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    cursor: pointer;
}

.product-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: auto;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.date-input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.date-controls:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-nav-btn {
    background: #f8f9fa;
    border: none;
    padding: 12px 10px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    min-width: 40px;
}

.date-nav-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.date-nav-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.date-nav-btn:hover {
    background: #e9ecef;
    color: #333;
}

.date-nav-btn:active {
    background: #dee2e6;
}

.date-controls .date-input {
    border: none;
    border-radius: 0;
    flex: 1;
    padding: 12px 15px;
    background: transparent;
}

.date-controls .date-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.load-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    white-space: nowrap;
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.video-display {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Product Description Styles */
.product-description {
    margin-bottom: 25px;
}

.product-desc-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 25px;
    border-left: 4px solid #28a745;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.product-header h3 {
    color: #333;
    font-size: 1.2em;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.product-content p {
    color: #555;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95em;
}

/* Products Grid Styles */
.products-grid {
    margin-bottom: 20px;
}

.model-products {
    margin-bottom: 15px;
}

.products-header {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1e5e9;
}

.products-header h3 {
    color: #333;
    font-size: 1.4em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-thumbnail {
    width: 180px;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: white;
    font-size: 1.5em;
    position: relative;
    overflow: hidden;
}

.product-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .play-overlay {
    opacity: 1;
}

.no-video-overlay {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.6em;
    text-align: center;
    padding: 1px;
    border-radius: 0 0 8px 8px;
}

.product-card.no-video .product-thumbnail {
    background: #f5576c;
}

.product-card.has-video .product-thumbnail {
    background: transparent;
}

.product-info h4 {
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-info p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-meta span {
    background: #f8f9fa;
    color: #667eea;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 25px 25px 0;
    border-color: transparent #28a745 transparent transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card.selected::after {
    opacity: 1;
}

.product-card.selected {
    border-color: #28a745;
    background: #f8fff9;
}

/* Model Introduction Styles */
.model-introduction {
    margin-bottom: 30px;
}

.model-intro-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.model-intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.model-intro-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.intro-header {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.intro-header h3 {
    color: white;
    font-size: 1.6em;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.intro-content {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.intro-section {
    min-width: auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.intro-section h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.intro-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9em;
    margin: 0;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.video-header h2 {
    color: #333;
    font-size: 2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-header h2::before {
    content: '🌊';
    font-size: 0.8em;
}

.video-info {
    color: #666;
    font-size: 1em;
}

.video-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    text-align: center;
    color: #999;
    padding: 60px;
}

.video-placeholder i {
    font-size: 5em;
    margin-bottom: 25px;
    display: block;
    opacity: 0.5;
}

.video-placeholder p {
    font-size: 1.2em;
}

.video-card {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.video-thumbnail {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4em;
    position: relative;
    overflow: hidden;
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

.video-thumbnail i {
    position: relative;
    z-index: 1;
}

.thumbnail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.video-info-card {
    padding: 25px;
}

.video-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    word-break: break-all;
}

.video-meta {
    color: #666;
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading, .no-data {
    text-align: center;
    padding: 60px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #e1e5e9;
}

.loading i {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
}

.no-data i {
    font-size: 2.5em;
    color: #f5576c;
    margin-bottom: 20px;
}

.oceannet-description {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.description-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.description-header h3 {
    color: #333;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.description-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.description-section h4 {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-section p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95em;
}

.video-player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.modal-body {
    padding: 0;
    position: relative;
}

.modal-body video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    outline: none;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.modal-footer .video-info {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .model-buttons {
        flex-wrap: wrap;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .product-selector {
        min-width: auto;
    }
    
    .input-group {
        min-width: auto;
    }
    
    .date-controls {
        min-width: auto;
    }
    
    .date-nav-btn {
        min-width: 35px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .video-card {
        max-width: none;
    }
    
    .video-thumbnail {
        height: 250px;
        font-size: 3em;
    }
    
    .play-overlay {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .description-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .model-intro-card {
        padding: 20px;
    }
    
    .intro-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .intro-section {
        min-width: auto;
    }
    
    .modal-content {
        width: 98%;
        max-width: none;
    }
    
    .modal-body video {
        max-height: 60vh;
    }
    
    .controls-placeholder.active {
        height: 70px;
    }
}

@media (max-width: 480px) {
    .controls-panel, .video-display, .oceannet-description {
        padding: 20px;
    }
    
    .modal-header, .modal-footer {
        padding: 15px 20px;
    }
    
    .model-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .video-thumbnail {
        height: 200px;
        font-size: 2.5em;
    }
    
    .play-overlay {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .description-section {
        padding: 15px;
    }
}

.controls-panel.sticky .load-btn {
    padding: 8px 16px;
    font-size: 13px;
    margin: 0;
    flex-shrink: 0;
} 