/**
 * Galactic EA AI - Component Styles
 * Cards, badges, alerts, and interactive components
 */

/* ================================================================
   FEATURE CARDS - RESPONSIVE
   ================================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 35px 0;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .feature-grid {
        gap: 15px;
        margin: 20px 0;
    }
}

.feature-card {
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(123, 119, 198, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(123, 119, 198, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 119, 198, 0.3) 0%, rgba(123, 119, 198, 0.2) 50%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    z-index: 0;
}

.feature-card:hover::before {
    width: 300px;
    height: 300px;
    opacity: 1;
    animation: rotateGlobe 4s linear infinite;
    box-shadow: 0 0 60px rgba(255, 119, 198, 0.4);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(123, 119, 198, 0.2);
    box-shadow: 
        0 15px 50px rgba(123, 119, 198, 0.4),
        0 0 60px rgba(255, 119, 198, 0.3),
        inset 0 0 80px rgba(0, 212, 255, 0.1);
    border-color: rgba(255, 119, 198, 0.6);
}

.feature-card h4 {
    color: #7b77c6;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 15px rgba(123, 119, 198, 0.5);
}

.feature-card p {
    color: #e0e7ff;
    margin: 0;
    line-height: 1.7;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

/* ================================================================
   ALERT BOXES
   ================================================================ */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #d4edda;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #fff3cd;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
    color: #d1ecf1;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #f8d7da;
}

/* ================================================================
   BADGES
   ================================================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 5px;
}

.badge-new {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
}

.badge-featured {
    background: linear-gradient(45deg, #00d4ff, #4ecdc4);
    color: white;
}

.badge-license {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.stat-card {
    background: rgba(10, 10, 26, 0.7);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(123, 119, 198, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(123, 119, 198, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 119, 198, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    opacity: 0;
}

.stat-card:hover::before {
    width: 200px;
    height: 200px;
    opacity: 1;
    animation: rotateGlobe 3s linear infinite;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(123, 119, 198, 0.4),
        0 0 50px rgba(255, 119, 198, 0.3);
    border-color: rgba(255, 119, 198, 0.6);
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7b77c6 0%, #ff77c6 50%, #00d4ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    position: relative;
    z-index: 1;
}

.stat-card .label {
    color: #b8c5d6;
    font-size: 0.9rem;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card .number {
        font-size: 2.5rem;
    }
    
    .stat-card .label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px 12px;
    }
    
    .stat-card .number {
        font-size: 2rem;
    }
}

/* ================================================================
   PARAMETER TABLES
   ================================================================ */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.param-table th {
    background: rgba(0, 212, 255, 0.2);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.param-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.param-table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.param-table tr:last-child td {
    border-bottom: none;
}

/* ================================================================
   CODE BLOCKS
   ================================================================ */
.code-block {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 4px solid #00d4ff;
}

/* ================================================================
   ICON LIST
   ================================================================ */
.icon-list {
    list-style: none;
    padding: 0;
}

.icon-list li {
    padding: 10px 0;
    padding-left: 40px;
    position: relative;
    color: #b8c5d6;
}

.icon-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.2em;
}

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #4ecdc4);
    transition: width 0.3s ease;
}

/* ================================================================
   TIMELINE
   ================================================================ */
.timeline {
    position: relative;
    padding-left: 40px;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 212, 255, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00d4ff;
    border: 3px solid #0c0c2e;
}

.timeline-item h4 {
    color: #00d4ff;
    margin-bottom: 5px;
}

.timeline-item p {
    color: #b8c5d6;
    margin: 0;
}

/* ================================================================
   ACCORDION
   ================================================================ */
.accordion {
    margin: 20px 0;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: rgba(0, 212, 255, 0.15);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.active {
    max-height: 1000px;
    padding: 20px;
}

.accordion-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-toggle.active {
    transform: rotate(45deg);
}

/* ================================================================
   SEARCH BOX
   ================================================================ */
.search-box {
    position: relative;
    margin: 20px 0;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.search-box::after {
    content: "🔍";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ================================================================
   BREADCRUMBS
   ================================================================ */
.breadcrumbs {
    padding: 20px 0;
    color: #b8c5d6;
}

.breadcrumbs a {
    color: #00d4ff;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 10px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.footer p {
    color: #b8c5d6;
    margin-bottom: 10px;
}

.footer a {
    color: #00d4ff;
    text-decoration: none;
    margin: 0 15px;
}

.footer a:hover {
    text-decoration: underline;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 768px) {
    .param-table {
        font-size: 0.9rem;
    }
    
    .param-table th,
    .param-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .param-table {
        font-size: 0.8rem;
    }
    
    .param-table th,
    .param-table td {
        padding: 8px 5px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .action-icon {
        font-size: 2.5rem;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* ================================================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ================================================================ */
@media (hover: none) and (pointer: coarse) {
    .action-card,
    .feature-card,
    .tab-button {
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.2);
    }
    
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .tab-button {
        padding: 15px 20px;
    }
}
