/* ============================================
   PLATFORMS PAGE STYLES
   Version: 3.0
   ============================================ */

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* Header Section */
.platforms-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-title i {
    background: none;
    -webkit-text-fill-color: #667eea;
    color: #667eea;
}

.page-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto 30px;
    animation: fadeInUp 0.6s ease;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 45px 14px 50px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    color: #1f2937;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: white;
}

.search-clear {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.category-btn i {
    font-size: 14px;
}

.category-btn .filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 5px;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

#resultsCount {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
}

/* Platforms Container */
.platforms-container {
    transition: all 0.3s ease;
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-view .platform-card {
    display: flex;
    align-items: center;
    padding: 20px;
}

.list-view .platform-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 0;
    margin-right: 25px;
}

.list-view .platform-card-content {
    flex: 1;
}

.list-view .platform-links {
    flex-direction: row;
    margin-top: 0;
}

/* Category Section */
.category-section {
    margin-bottom: 50px;
    animation: fadeInUp 0.5s ease;
}

.category-title {
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-title i {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
}

.category-count {
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 30px;
    margin-left: auto;
}

/* Platform Card */
.platform-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.5s ease backwards;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f59e0b);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.platform-card:hover::before {
    transform: scaleX(1);
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Platform Badge */
.platform-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.featured-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Platform Icon */
.platform-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.platform-card:hover .platform-icon {
    transform: scale(1.05);
}

/* Platform Title */
.platform-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

/* Platform Description */
.platform-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}

.platform-short-desc {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

/* Platform Tags */
.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.platform-tag {
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
}

.platform-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Platform Stats */
.platform-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.platform-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.platform-stats i {
    color: #667eea;
    font-size: 12px;
}

.platform-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    display: inline-flex;
    gap: 2px;
}

.stars i {
    font-size: 12px;
}

.rating-value {
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
}

/* Platform Links */
.platform-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.platform-link:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.docs-link {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.docs-link:hover {
    background: #667eea;
    color: white;
    transform: translateX(3px);
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    grid-column: 1 / -1;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    grid-column: 1 / -1;
}

.error-message i {
    font-size: 64px;
    color: #ef4444;
    margin-bottom: 20px;
}

.error-message h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 15px;
}

.error-message p {
    color: #6b7280;
    margin-bottom: 20px;
}

.error-message code {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    margin: 10px 0;
    font-family: monospace;
}

.error-message .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    grid-column: 1 / -1;
}

.empty-message i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-message h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 10px;
}

.empty-message p {
    color: #6b7280;
    margin-bottom: 25px;
}

.empty-message .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 20px;
    }
    
    .page-title {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .category-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .category-btn i {
        font-size: 12px;
    }
    
    .grid-view {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .list-view .platform-card {
        flex-direction: column;
        text-align: center;
    }
    
    .list-view .platform-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .list-view .platform-links {
        justify-content: center;
    }
    
    .category-title {
        font-size: 22px;
    }
    
    .category-title i {
        font-size: 24px;
        width: 40px;
        height: 40px;
    }
    
    .platform-card {
        padding: 20px;
    }
    
    .platform-card h3 {
        font-size: 18px;
    }
    
    .platform-links {
        flex-direction: column;
    }
    
    .platform-link {
        justify-content: center;
    }
    
    .results-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .category-filters {
        gap: 6px;
    }
    
    .category-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .platform-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .platform-tags {
        gap: 6px;
    }
    
    .platform-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .platform-card {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .platform-card h3 {
        color: #f3f4f6;
    }
    
    .platform-description {
        color: #9ca3af;
    }
    
    .platform-tag {
        background: #374151;
        color: #d1d5db;
    }
    
    .platform-stats {
        border-top-color: #374151;
    }
    
    .platform-stats span {
        color: #9ca3af;
    }
    
    .search-input {
        background: rgba(31, 41, 55, 0.95);
        color: #f3f4f6;
        border-color: #4b5563;
    }
    
    .empty-message {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .empty-message h3 {
        color: #f3f4f6;
    }
    
    .loading-container {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .error-message {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .error-message h3 {
        color: #f3f4f6;
    }
    
    .error-message code {
        background: #374151;
        color: #d1d5db;
    }
}

/* Print Styles */
@media print {
    .menu-btn,
    .side-menu,
    .category-filters,
    .search-section,
    .results-info,
    .platform-links,
    .platform-badge {
        display: none !important;
    }
    
    .platform-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .grid-view {
        display: block;
    }
    
    .platform-card {
        margin-bottom: 20px;
    }
}