/* Main Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

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

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 20px;
    background-color: #fff;
}

/* Button Styles */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Stats Display */
.stats {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.stats small {
    color: #6c757d;
    display: block;
    margin-bottom: 5px;
}

/* Challenge Specific Styles */
.challenge-container {
    text-align: center;
    padding: 20px;
}

.challenge-card {
    width: 200px;
    height: 300px;
    margin: 0 auto;
    perspective: 1000px;
}

.challenge-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.challenge-card.flipped .challenge-card-inner {
    transform: rotateY(180deg);
}

.challenge-card-front, .challenge-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.challenge-card-back {
    transform: rotateY(180deg);
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .challenge-card {
        width: 150px;
        height: 225px;
    }
}

/* Flash Messages Container */
.flash-messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    width: auto;
}

.flash-message {
    margin-bottom: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    line-height: 1.4;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

/* Real-time Target Selection Styles */
.realtime-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.realtime-notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2em;
    color: #ffd700;
}

.target-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.target-display.active {
    opacity: 1;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

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

.target-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.target-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

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

.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
}

.connection-status.connected {
    background: rgba(40, 167, 69, 0.9);
}

.connection-status.disconnected {
    background: rgba(220, 53, 69, 0.9);
}

.connection-status i {
    font-size: 0.9em;
}

/* Group target selection interface */
.target-selection-interface {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.target-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.target-selection-header h4 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.target-permissions {
    font-size: 0.9em;
    color: #6c757d;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
}

.target-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.target-option-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.target-option-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.target-option-card.selected::before {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 1.2em;
    font-weight: bold;
}

.target-option-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.target-option-label {
    font-weight: 600;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .realtime-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .realtime-notification.show {
        transform: translateY(0);
    }
    
    .target-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .target-option-card {
        padding: 15px 10px;
    }
    
    .target-option-icon {
        font-size: 1.5em;
    }
} 