/* ===== FRONTEND STYLES - CTC CAR COMMUNITY ===== */

/* Container for all components */
.ctc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Car Tuning Community Brand Colors */
:root {
    --ctc-primary: #007cba;
    --ctc-secondary: #ff6b35;
    --ctc-accent: #ffd23f;
    --ctc-dark: #2c3e50;
    --ctc-light: #ecf0f1;
    --ctc-border: #bdc3c7;
}

/* ===== USER PROFILE STYLES ===== */
.ctc-user-profile {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.ctc-profile-header {
    background: linear-gradient(135deg, var(--ctc-primary), var(--ctc-secondary));
    color: white;
    padding: 30px;
    text-align: center;
}

.ctc-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 20px;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--ctc-dark);
}

.ctc-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ctc-profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.ctc-profile-nickname {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.ctc-profile-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
}

.ctc-profile-body {
    padding: 30px;
}

.ctc-profile-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ctc-border);
}

.ctc-profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ctc-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ctc-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctc-car-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ctc-car-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--ctc-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ctc-car-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ctc-car-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ctc-dark);
    margin-bottom: 8px;
}

.ctc-car-specs {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ===== EVENTS STYLES ===== */
.ctc-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.ctc-event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.ctc-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.ctc-event-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--ctc-primary), var(--ctc-secondary));
}

.ctc-event-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.ctc-event-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: var(--ctc-dark);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ctc-event-status {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ctc-event-status.active {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.ctc-event-status.ended {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.ctc-event-content {
    padding: 25px;
}

.ctc-event-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ctc-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.ctc-event-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
}

.ctc-event-location::before {
    content: '📍';
    font-size: 1rem;
}

.ctc-event-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ctc-event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ctc-event-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ctc-event-button.primary {
    background: var(--ctc-primary);
    color: white;
}

.ctc-event-button.primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.ctc-event-button.secondary {
    background: transparent;
    color: var(--ctc-primary);
    border: 1px solid var(--ctc-primary);
}

.ctc-event-button.secondary:hover {
    background: var(--ctc-primary);
    color: white;
}

/* ===== REGISTRATION FORM ===== */
.ctc-registration-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.ctc-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ctc-dark);
    margin-bottom: 20px;
    text-align: center;
}

.ctc-form-group {
    margin-bottom: 20px;
}

.ctc-form-label {
    display: block;
    font-weight: 600;
    color: var(--ctc-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.ctc-form-input,
.ctc-form-select,
.ctc-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.ctc-form-input:focus,
.ctc-form-select:focus,
.ctc-form-textarea:focus {
    outline: none;
    border-color: var(--ctc-primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ctc-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.ctc-form-button {
    width: 100%;
    padding: 14px 20px;
    background: var(--ctc-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctc-form-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.ctc-form-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===== USER EVENTS (v1.0.42 - WITHOUT FILTER TABS) ===== */
.ctc-user-events {
    margin: 20px 0;
}

.ctc-user-events-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ctc-event-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.ctc-event-item:hover {
    background-color: #f8f9fa;
}

.ctc-event-item:last-child {
    border-bottom: none;
}

.ctc-event-item h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--ctc-dark);
}

.ctc-event-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.ctc-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.ctc-status-approved {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.ctc-status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.ctc-status-rejected {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* ===== CARS GALLERY ===== */
.ctc-cars-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.ctc-car-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.ctc-car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ctc-car-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f8f9fa;
    border: none;
}

.ctc-car-info {
    padding: 20px;
}

.ctc-car-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ctc-dark);
    margin-bottom: 10px;
}

.ctc-car-specs {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.ctc-car-owner {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #999;
}

/* ===== USER DASHBOARD ===== */
.ctc-user-dashboard {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
}

.ctc-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.ctc-dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ctc-primary);
    margin-bottom: 10px;
}

.ctc-dashboard-subtitle {
    font-size: 1.1rem;
    color: #666;
}

.ctc-dashboard-tabs {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.ctc-dashboard-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ctc-dashboard-tab.active {
    background: var(--ctc-primary);
    color: white;
}

.ctc-dashboard-tab:not(.active):hover {
    background: rgba(0, 124, 186, 0.1);
}

.ctc-dashboard-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ctc-dashboard-section {
    margin-bottom: 30px;
}

.ctc-dashboard-section:last-child {
    margin-bottom: 0;
}

/* ===== COMMUNITY STATS ===== */
.ctc-community-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ctc-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.ctc-stat-card:hover {
    transform: translateY(-2px);
}

.ctc-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ctc-primary);
    display: block;
    margin-bottom: 10px;
}

.ctc-stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* ===== FORMS STYLES ===== */
.ctc-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.ctc-form-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.ctc-form-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ===== LOADING STATES ===== */
.ctc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--ctc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

.ctc-btn-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ctc-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== UTILITIES ===== */
.ctc-text-center { text-align: center; }
.ctc-text-left { text-align: left; }
.ctc-text-right { text-align: right; }
.ctc-mb-0 { margin-bottom: 0; }
.ctc-mb-10 { margin-bottom: 10px; }
.ctc-mb-20 { margin-bottom: 20px; }
.ctc-mb-30 { margin-bottom: 30px; }
.ctc-mt-10 { margin-top: 10px; }
.ctc-mt-20 { margin-top: 20px; }
.ctc-mt-30 { margin-top: 30px; }

.ctc-hidden { display: none; }
.ctc-visible { display: block; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .ctc-container {
        padding: 15px;
    }
    
    .ctc-events-grid,
    .ctc-cars-gallery,
    .ctc-community-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ctc-profile-header {
        padding: 20px;
    }
    
    .ctc-profile-name {
        font-size: 1.5rem;
    }
    
    .ctc-profile-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .ctc-event-card,
    .ctc-car-card {
        margin: 0 0 20px 0;
    }
    
    .ctc-dashboard-tabs {
        flex-direction: column;
    }
    
    .ctc-dashboard-tab {
        margin-bottom: 5px;
    }
    
    .ctc-form-button {
        font-size: 1rem;
        padding: 12px 16px;
    }
}

/* ===== MODAL STYLES ===== */
.ctc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.ctc-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ctc-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ctc-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ctc-dark);
    margin: 0;
}

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

.ctc-modal-close:hover {
    background: #f0f0f0;
    color: var(--ctc-dark);
}

.ctc-modal-body {
    padding: 30px;
}

.ctc-car-details-modal {
    min-width: 800px;
    max-width: 900px;
}

.ctc-car-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.ctc-photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ctc-photo-item:hover {
    transform: scale(1.05);
}

.ctc-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.ctc-gallery-image {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.ctc-gallery-image:hover {
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ctc-modal-overlay {
        padding: 10px;
    }
    
    .ctc-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .ctc-modal-header {
        padding: 15px 20px;
    }
    
    .ctc-modal-body {
        padding: 20px;
    }
    
    .ctc-car-details-modal {
        min-width: auto;
    }
    
    .ctc-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .ctc-car-basic-info p {
        font-size: 14px;
    }
    
    .ctc-car-basic-info strong {
        min-width: 100px;
    }
}