/* ===== Team Bot Commands Styles - Enhanced ===== */

/* Bot Commands Container */
.bot-commands-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    padding: 2rem 0;
    position: relative;
}

.bot-commands-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Bot Commands Header */
.bot-commands-header {
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.bot-commands-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
}

.bot-commands-title svg {
    color: #3b82f6;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
    animation: icon-pulse 2s ease-in-out infinite;
}

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

.bot-commands-subtitle {
    color: #cbd5e1;
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.bot-commands-role-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 9999px;
    color: #60a5fa;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Stats Cards */
.bot-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.bot-stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bot-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bot-stat-card:hover::before {
    opacity: 1;
}

.bot-stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.6);
}

.bot-stat-card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

.bot-stat-card-blue:hover {
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4);
}

.bot-stat-card-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}

.bot-stat-card-green:hover {
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.4);
}

.bot-stat-card-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.4);
}

.bot-stat-card-purple:hover {
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.4);
}

.bot-stat-card-orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}

.bot-stat-card-orange:hover {
    box-shadow: 0 25px 50px -12px rgba(245, 158, 11, 0.4);
}

.bot-stat-content {
    display: flex;
    flex-direction: column;
}

.bot-stat-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.bot-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bot-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    color: currentColor;
    opacity: 0.9;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.bot-stat-card:hover .bot-stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Command Form */
.bot-command-form-container {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.bot-command-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 200% 100%;
    animation: border-flow 3s linear infinite;
}

@keyframes border-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.bot-command-form-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.bot-command-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.bot-form-group {
    margin-bottom: 1.5rem;
}

.bot-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.bot-form-input,
.bot-form-select,
.bot-form-textarea {
    width: 100%;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.bot-form-input:focus,
.bot-form-select:focus,
.bot-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bot-form-input::placeholder,
.bot-form-textarea::placeholder {
    color: #6b7280;
}

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

/* Required Fields Info */
.bot-required-fields-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.bot-required-fields-text {
    font-size: 0.875rem;
    color: #93c5fd;
}

/* Form Buttons */
.bot-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.bot-btn-submit {
    flex: 1;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bot-btn-submit:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.bot-btn-submit:active {
    transform: translateY(0);
}

.bot-btn-reset {
    padding: 0.75rem 1.5rem;
    background: rgba(55, 65, 81, 1);
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bot-btn-reset:hover {
    background: rgba(75, 85, 99, 1);
}

/* Service Selector */
.bot-service-selector {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.bot-service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.bot-service-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bot-service-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bot-service-btn-active {
    background: #2563eb;
    color: #ffffff;
}

.bot-service-btn-inactive {
    background: rgba(55, 65, 81, 1);
    color: #d1d5db;
}

.bot-service-btn-inactive:hover {
    background: rgba(75, 85, 99, 1);
}

/* Recent Commands */
.bot-recent-commands {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.bot-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.bot-recent-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.bot-recent-service-badge {
    font-size: 0.875rem;
    color: #9ca3af;
}

.bot-commands-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
}

.bot-command-item {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.6) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 0.875rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bot-command-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bot-command-item:hover::before {
    opacity: 1;
}

.bot-command-item:hover {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.bot-command-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bot-command-type-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.bot-command-delete-btn {
    color: #f87171;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bot-command-delete-btn:hover {
    color: #fca5a5;
}

.bot-command-target {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.bot-command-message {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bot-command-date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Empty State */
.bot-empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.bot-empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.5rem;
    opacity: 0.5;
}

/* Access Denied */
.bot-access-denied {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.bot-access-denied-card {
    background: rgba(127, 29, 29, 0.5);
    border: 1px solid #ef4444;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.bot-access-denied-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #f87171;
}

.bot-access-denied-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.bot-access-denied-text {
    color: #d1d5db;
}

/* Grid Layout */
.bot-command-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .bot-command-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Grid */
.bot-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.bot-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .bot-form-grid-2,
    .bot-form-grid-3 {
        grid-template-columns: 1fr;
    }

    .bot-stats-grid {
        grid-template-columns: 1fr;
    }

    .bot-commands-title {
        font-size: 2rem;
    }

    .bot-form-actions {
        flex-direction: column;
    }
}

/* Custom Scrollbar for Commands List */
.bot-commands-list::-webkit-scrollbar {
    width: 6px;
}

.bot-commands-list::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.3);
    border-radius: 3px;
}

.bot-commands-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    border-radius: 3px;
}

.bot-commands-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00ffff, #a855f7);
}

/* Loading State */
.bot-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.bot-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: bot-spin 0.8s linear infinite;
}

@keyframes bot-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error States */
.bot-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    z-index: 9999;
    animation: bot-slide-in 0.3s ease;
}

.bot-notification-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: #ffffff;
    border: 1px solid #10b981;
}

.bot-notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    color: #ffffff;
    border: 1px solid #ef4444;
}

@keyframes bot-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Danger Zone Styles */
.bot-danger-zone {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3) 0%, rgba(153, 27, 27, 0.2) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.bot-danger-zone-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bot-danger-zone-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fca5a5;
}

.bot-danger-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    font-weight: 600;
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.bot-danger-btn-orange {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.bot-danger-btn-orange:hover {
    background: linear-gradient(135deg, #c2410c, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.4);
}

.bot-danger-btn-red {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.bot-danger-btn-red:hover {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

/* Command Type Groups */
.bot-command-type-group {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.75rem;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.bot-command-type-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hover Effects */
.bot-interactive {
    transition: all 0.2s ease;
}

.bot-interactive:hover {
    transform: translateY(-2px);
}

.bot-interactive:active {
    transform: translateY(0);
}

/* Focus Visible */
.bot-form-input:focus-visible,
.bot-form-select:focus-visible,
.bot-form-textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Disabled State */
.bot-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tooltips */
.bot-tooltip {
    position: relative;
}

.bot-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(17, 24, 39, 0.95);
    color: #ffffff;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.bot-tooltip:hover::after {
    opacity: 1;
}

/* Responsive Padding */
@media (max-width: 640px) {
    .bot-commands-container {
        padding: 1rem 0;
    }

    .bot-command-form-container,
    .bot-service-selector,
    .bot-recent-commands {
        padding: 1rem;
    }

    .bot-stat-card {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .bot-service-selector,
    .bot-command-delete-btn,
    .bot-btn-submit,
    .bot-btn-reset {
        display: none !important;
    }

    .bot-commands-container {
        background: #ffffff;
    }

    .bot-command-item {
        page-break-inside: avoid;
    }
}
