/* Custom CSS for AI Fine-Tuning as a Service */

/* ===== Notification area ===== */
#notification-area {
    z-index: 1060;
}

/* ===== General Styles ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1a1d21;
    background-image: linear-gradient(to bottom, #1a1d21, #292e35);
    background-attachment: fixed;
}

footer {
    margin-top: auto;
}

.content-container {
    background-color: rgba(25, 27, 30, 0.7);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.flash-message-container {
    margin: 1rem 0;
}

.alert {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== Navigation Styles ===== */
.navbar-custom {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.7rem 1rem;
    background: linear-gradient(to right, #1a1d21, #292e35) !important;
}

.navbar-brand {
    padding: 0;
    margin-right: 2rem;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .active>.nav-link,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    opacity: 0.7;
}

.user-dropdown {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3rem;
    padding: 0.5rem 1rem;
}

.nav-signup-btn {
    border-radius: 2rem;
    padding: 0.5rem 1.2rem;
    margin-left: 0.5rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ===== Footer Styles ===== */
.footer-custom {
    background: linear-gradient(to right, #1a1d21, #292e35);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-logo {
    max-height: 40px;
    width: auto;
}

.footer-heading {
    font-weight: 600;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--bs-primary);
    border-radius: 3px;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-contact a:hover {
    color: white;
}

.footer-icon-circle {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.footer-contact a:hover .footer-icon-circle {
    background-color: var(--bs-primary);
}

.social-icon-circle {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.social-icon-circle:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icons-container {
    display: flex;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .social-icons-container {
        justify-content: center;
    }
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer-bottom-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s;
    margin: 0 0.75rem;
    padding: 0.5rem 0;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-bottom-link:hover {
    color: white;
}

/* ===== NVIDIA Partnership Badge Styles ===== */
.nvidia-partnership-badge {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(118, 185, 0, 0.3);
    background: linear-gradient(135deg, rgba(118, 185, 0, 0.05) 0%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 8px;
    margin: 0 -1rem;
}

.nvidia-badge-text {
    color: #76B900 !important;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(118, 185, 0, 0.3);
}

.nvidia-badge {
    max-width: 300px;
    height: auto;
    transition: all 0.3s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    border-radius: 4px;
}

.nvidia-badge:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 16px rgba(118, 185, 0, 0.4));
}

@media (max-width: 768px) {
    .nvidia-badge {
        max-width: 240px;
    }
    
    .nvidia-badge-text {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
}

/* ===== Pricing Page Styles ===== */
.setup-fee {
    opacity: 0.7;
    font-size: 0.85rem;
}

.setup-fee small {
    color: rgba(255, 255, 255, 0.6) !important;
}

.price-area h2 {
    color: #8850bd;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(136, 80, 189, 0.3);
}

.price-area .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer-bottom-link {
        padding: 0.75rem 0.5rem;
        margin: 0 0.5rem;
    }
}

/* Section headers */
.section-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ===== Card Styles ===== */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ===== Button Styles ===== */
.btn {
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

.btn-icon-only {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0;
    }
}

.btn-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1030;
}

.btn-floating i {
    font-size: 1.5rem;
}

/* ===== Form Styles ===== */
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--bs-primary);
}

@media (max-width: 768px) {
    .form-control, .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-label {
        margin-bottom: 0.4rem;
    }
    
    .form-check {
        padding-left: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .form-check-input {
        margin-top: 0.3rem;
        margin-left: -1.75rem;
    }
}

/* Code blocks */
pre {
    background-color: #2a2e35;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

code {
    color: #e83e8c;
}

/* ===== Dashboard Styles ===== */
.stats-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

.stats-card i {
    color: var(--bs-primary);
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Status badges */
.status-badge {
    padding: 0.4rem 0.7rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* ===== Model Creation Styles ===== */
.model-info-box {
    background-color: rgba(33, 37, 41, 0.5);
}

.professional-use-case {
    transition: background-color 0.2s;
}

.professional-use-case:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* ===== Fine-tuning Styles ===== */
.training-example-row {
    transition: background-color 0.2s;
}

.training-example-row:hover {
    background-color: rgba(33, 37, 41, 0.7);
}

/* ===== Deployment Styles ===== */
.deployment-card {
    border-left: 4px solid transparent;
}

.deployment-card.active {
    border-left-color: var(--bs-success);
}

.deployment-card.inactive {
    border-left-color: var(--bs-secondary);
}

.deployment-card.suspended {
    border-left-color: var(--bs-warning);
}

/* API endpoints */
.api-endpoint {
    background-color: rgba(33, 37, 41, 0.7);
    padding: 1rem;
    border-radius: 0.3rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--bs-primary);
}

.api-endpoint-method {
    background-color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.api-key-display {
    font-family: monospace;
    background-color: rgba(33, 37, 41, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
}

/* ===== Analytics Styles ===== */
.analytics-card {
    height: 100%;
}

.analytics-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.analytics-insight-card {
    transition: transform 0.2s;
}

.analytics-insight-card:hover {
    transform: translateY(-5px);
}

.chart-container {
    position: relative;
    min-height: 300px;
}

/* ===== Pricing Styles ===== */
.price-card {
    transition: transform 0.3s;
}

.price-card:hover {
    transform: translateY(-10px);
}

.price-card.highlight {
    border: 2px solid var(--bs-primary);
    transform: scale(1.05);
}

.price-card.highlight:hover {
    transform: scale(1.05) translateY(-10px);
}

.price-card .card-header {
    border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

.price-area {
    background-color: rgba(33, 37, 41, 0.5);
    border-radius: 0.5rem;
}

/* ===== Account Styles ===== */
.subscription-status {
    padding: 0.5rem;
    border-radius: 0.3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.subscription-status.active {
    background-color: rgba(25, 135, 84, 0.2);
    border: 1px solid rgba(25, 135, 84, 0.5);
}

.subscription-status.inactive {
    background-color: rgba(108, 117, 125, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.5);
}

.subscription-status.expired {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

/* Placeholder for empty sections */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn-floating {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .price-card.highlight {
        transform: none;
    }
    
    .price-card.highlight:hover {
        transform: translateY(-10px);
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .row > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .modal-dialog {
        margin: 0.75rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .table td, .table th {
        padding: 0.75rem;
    }
    
    /* Marketplace adjustments for mobile */
    .marketplace-card .card-body {
        padding: 1rem;
    }
    
    .marketplace-section {
        margin-bottom: 2rem;
    }
}

/* ===== Animation Styles ===== */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Loading animation */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== Custom Toggle Switch Styles ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

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

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

input:checked + .toggle-slider {
    background-color: var(--bs-primary);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--bs-primary);
}

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

/* ===== Utility Classes ===== */
.bg-dark-light {
    background-color: #2a2e35;
}

.border-dashed {
    border-style: dashed !important;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-50 {
    opacity: 0.5;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.max-height-300 {
    max-height: 300px;
    overflow-y: auto;
}

/* Add a little shine effect to cards */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.5s;
}

.card-shine:hover::after {
    transform: rotate(30deg) translate(10%, 10%);
}

/* ===== Marketplace Styles ===== */
.marketplace-hero {
    background: linear-gradient(45deg, #3a0ca3, #4cc9f0);
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.marketplace-card {
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.marketplace-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.marketplace-filter {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.marketplace-section {
    margin-bottom: 3rem;
}

.model-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.model-card .card-img-top {
    height: 160px;
    object-fit: cover;
}

/* Icon placeholder container */
.card-img-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(33, 37, 41, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Market model icons in browse view */
.market-model-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: currentColor;
    color: #adb5bd;
    background-color: transparent;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.market-model-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-model-icon i {
    font-size: 40px;
    background-color: rgba(33, 37, 41, 0.7);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Market model icons in detail view */
.market-model-detail-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.market-model-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Similar model thumbnails */
.similar-model-thumb {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.similar-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-model-thumb i {
    font-size: 20px;
    background-color: rgba(33, 37, 41, 0.7);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.model-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
}
