/**
 * WP Torrent Tracker - Public Styles
 * Plugin URI: https://github.com/Avihs-G/wp-torrent-tracker
 * Version: 1.0.0
 * Author: RockNRoll
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.tracker-torrent-list,
.tracker-single-torrent,
.tracker-user-stats,
.tracker-global-stats,
.tracker-upload-form,
.tracker-latest-torrents,
.tracker-user-torrents {
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.tracker-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    margin: 15px 0;
}

.tracker-table th,
.tracker-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tracker-table thead th {
    background: #f7f7f7;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.tracker-table tbody tr:hover {
    background: #f9f9f9;
}

.tracker-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column Widths */
.tracker-col-name {
    width: 40%;
}

.tracker-col-size,
.tracker-col-date {
    width: 12%;
}

.tracker-col-seeders,
.tracker-col-leechers,
.tracker-col-completed {
    width: 8%;
    text-align: center;
}

.tracker-col-download {
    width: 10%;
    text-align: center;
}

/* ==========================================================================
   Seeder/Leecher Colors
   ========================================================================== */

.tracker-seeders {
    color: #2e7d32;
    font-weight: 600;
}

.tracker-leechers {
    color: #1565c0;
    font-weight: 600;
}

.tracker-uploaded {
    color: #2e7d32;
}

.tracker-downloaded {
    color: #1565c0;
}

/* Dead torrent row */
.tracker-dead {
    opacity: 0.6;
}

.tracker-dead .tracker-seeders {
    color: #c62828;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.tracker-btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.tracker-btn:hover {
    transform: translateY(-1px);
}

.tracker-btn:active {
    transform: translateY(0);
}

.tracker-btn-primary {
    background: #1976d2;
    color: #fff;
}

.tracker-btn-primary:hover {
    background: #1565c0;
    color: #fff;
}

.tracker-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.tracker-btn-secondary:hover {
    background: #e0e0e0;
}

.tracker-btn-warning {
    background: #ff9800;
    color: #fff;
}

.tracker-btn-warning:hover {
    background: #f57c00;
    color: #fff;
}

.tracker-btn-danger {
    background: #c62828;
    color: #fff;
}

.tracker-btn-danger:hover {
    background: #b71c1c;
    color: #fff;
}

.tracker-btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.tracker-btn-download {
    background: #4caf50;
    color: #fff;
    padding: 6px 12px;
}

.tracker-btn-download:hover {
    background: #43a047;
    color: #fff;
}

.tracker-btn-download-large {
    padding: 12px 24px;
    font-size: 16px;
}

.tracker-btn-search {
    background: #1976d2;
    color: #fff;
}

.tracker-icon-download {
    font-size: 16px;
}

.tracker-login-to-download {
    color: #999;
    cursor: not-allowed;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.tracker-search-form {
    margin-bottom: 20px;
}

.tracker-search-form form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.tracker-search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tracker-search-form input[type="search"]:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.tracker-search-results {
    padding: 10px 15px;
    background: #e3f2fd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.tracker-clear-search {
    margin-left: 15px;
    color: #1976d2;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */

.tracker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tracker-stat-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.tracker-stat-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tracker-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.tracker-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.tracker-progress-bar-container {
    display: inline-block;
    width: 80px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
}

.tracker-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tracker-progress-text {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: #666;
}

/* ==========================================================================
   Passkey Section
   ========================================================================== */

.tracker-passkey-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tracker-passkey-section h4 {
    margin: 0 0 15px 0;
}

.tracker-passkey-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tracker-passkey-value {
    font-family: monospace;
    font-size: 14px;
    background: #fff;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    letter-spacing: 1px;
}

.tracker-passkey-warning {
    margin-top: 10px;
    color: #c62828;
    font-size: 13px;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.tracker-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tracker-status-seeding {
    background: #e8f5e9;
    color: #2e7d32;
}

.tracker-status-leeching {
    background: #e3f2fd;
    color: #1565c0;
}

.tracker-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.tracker-status-banned {
    background: #ffebee;
    color: #c62828;
}

.tracker-status-dead {
    background: #f5f5f5;
    color: #757575;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.tracker-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.tracker-message-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.tracker-message-error {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.tracker-message-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.tracker-message-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.tracker-form {
    max-width: 600px;
}

.tracker-form-field {
    margin-bottom: 20px;
}

.tracker-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.tracker-form-field input[type="text"],
.tracker-form-field input[type="url"],
.tracker-form-field input[type="file"],
.tracker-form-field textarea,
.tracker-form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tracker-form-field input:focus,
.tracker-form-field textarea:focus,
.tracker-form-field select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.tracker-field-description {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.tracker-form-notice {
    padding: 12px 16px;
    background: #fff3e0;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
}

.tracker-form-notice code {
    display: block;
    margin-top: 5px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

.tracker-form-submit {
    margin-top: 25px;
}

/* ==========================================================================
   Single Torrent
   ========================================================================== */

.tracker-torrent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tracker-torrent-title {
    margin: 0;
    font-size: 22px;
    word-break: break-word;
    flex: 1;
}

.tracker-torrent-info {
    margin-bottom: 25px;
}

.tracker-info-table {
    border: none;
    background: transparent;
}

.tracker-info-table th {
    width: 150px;
    background: transparent;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.tracker-info-table td {
    border-bottom: 1px solid #eee;
}

.tracker-info-hash {
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 3px;
}

.tracker-torrent-files,
.tracker-torrent-peers {
    margin-top: 30px;
}

.tracker-torrent-files h4,
.tracker-torrent-peers h4 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tracker-files-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tracker-files-table {
    margin: 0;
    border: none;
}

.tracker-file-name {
    word-break: break-all;
}

.tracker-file-size {
    width: 100px;
    text-align: right;
    white-space: nowrap;
}

/* Peer rows */
.tracker-peer-seeder {
    background: #f1f8e9;
}

.tracker-peer-leecher {
    background: #e3f2fd;
}

/* ==========================================================================
   Latest Torrents Widget
   ========================================================================== */

.tracker-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tracker-latest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.tracker-latest-item:last-child {
    border-bottom: none;
}

.tracker-torrent-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 15px;
    color: #1976d2;
    text-decoration: none;
}

.tracker-torrent-name:hover {
    text-decoration: underline;
}

.tracker-latest-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    white-space: nowrap;
}

.tracker-latest-meta .tracker-size {
    color: #666;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.tracker-pagination {
    margin-top: 25px;
    text-align: center;
}

.tracker-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: 5px;
}

.tracker-pagination li {
    display: inline-block;
}

.tracker-pagination a,
.tracker-pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tracker-pagination a:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.tracker-pagination .current {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

.tracker-pagination .dots {
    background: transparent;
    border: none;
    padding: 8px 5px;
}

/* ==========================================================================
   Active Torrents
   ========================================================================== */

.tracker-active-torrents {
    margin-top: 30px;
}

.tracker-active-torrents h4 {
    margin: 0 0 15px 0;
}

.tracker-no-active {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* ==========================================================================
   Reset Section
   ========================================================================== */

.tracker-reset-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ==========================================================================
   Banned Notice
   ========================================================================== */

.tracker-banned-notice {
    padding: 15px 20px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #c62828;
    margin-top: 20px;
}

/* ==========================================================================
   Login Required / Access Denied
   ========================================================================== */

.tracker-login-required,
.tracker-access-denied,
.tracker-user-not-found,
.tracker-not-found,
.tracker-no-torrents {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.tracker-access-denied {
    background: #ffebee;
    color: #c62828;
}

/* ==========================================================================
   Upload Form
   ========================================================================== */

.tracker-upload-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    .tracker-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tracker-stat-value {
        font-size: 20px;
    }
    
    .tracker-torrent-header {
        flex-direction: column;
    }
    
    .tracker-table {
        font-size: 13px;
    }
    
    .tracker-table th,
    .tracker-table td {
        padding: 8px 10px;
    }
    
    .tracker-col-date,
    .tracker-col-completed {
        display: none;
    }
    
    .tracker-info-table th {
        width: 100px;
    }
    
    .tracker-passkey-display {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tracker-passkey-value {
        width: 100%;
        overflow-x: auto;
    }
    
    .tracker-latest-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tracker-torrent-name {
        white-space: normal;
        margin-right: 0;
    }
}

@media screen and (max-width: 480px) {
    .tracker-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tracker-search-form form {
        flex-direction: column;
    }
    
    .tracker-col-size {
        display: none;
    }
    
    .tracker-pagination a,
    .tracker-pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .tracker-btn,
    .tracker-search-form,
    .tracker-pagination,
    .tracker-passkey-section,
    .tracker-reset-section {
        display: none !important;
    }
    
    .tracker-table {
        border: 1px solid #000;
    }
    
    .tracker-table th,
    .tracker-table td {
        border: 1px solid #ccc;
    }
}

/**
 * WP Torrent Tracker - Public Styles
 * 
 * @package     WP_Torrent_Tracker
 * @author      RockNRoll
 * @license     GPL v2 or later
 * @since       1.0.0
 */

/* Torrent Container */
.wp-tracker-torrents {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.wp-tracker-title {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    font-size: 18px;
    color: #333;
}

/* Single Torrent Item */
.wp-tracker-torrent-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.wp-tracker-torrent-item:last-child {
    margin-bottom: 0;
}

/* Torrent Header */
.wp-tracker-torrent-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.wp-tracker-torrent-name {
    flex: 1;
    min-width: 200px;
    font-size: 16px;
}

.wp-tracker-torrent-name .torrent-icon {
    font-size: 20px;
}

/* Stats */
.wp-tracker-torrent-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wp-tracker-torrent-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.wp-tracker-torrent-stats .stat-seeders {
    background: rgba(40, 167, 69, 0.3);
}

.wp-tracker-torrent-stats .stat-leechers {
    background: rgba(255, 193, 7, 0.3);
}

.wp-tracker-torrent-stats .stat-completed {
    background: rgba(23, 162, 184, 0.3);
}

/* Download Button */
.wp-tracker-download-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #28a745;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.wp-tracker-download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    color: #fff !important;
}

.wp-tracker-login-btn {
    background: #6c757d;
}

.wp-tracker-login-btn:hover {
    background: #5a6268;
}

/* Details Section */
.wp-tracker-torrent-details {
    border-top: 1px solid #dee2e6;
}

.wp-tracker-toggle-details {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: background 0.2s;
}

.wp-tracker-toggle-details:hover {
    background: #e9ecef;
}

.wp-tracker-toggle-details .toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
    margin-right: 5px;
}

.wp-tracker-toggle-details.active .toggle-icon {
    transform: rotate(90deg);
}

/* Details Content */
.wp-tracker-details-content {
    padding: 20px;
}

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #dee2e6;
}

.detail-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
    font-weight: 600;
}

.detail-section p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.detail-section .tracker-url {
    display: block;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
    color: #333;
}

.detail-section .detail-note {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* Caution Box */
.wp-tracker-caution {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px !important;
    margin-bottom: 20px;
}

.wp-tracker-caution h4 {
    color: #856404;
}

.wp-tracker-caution p {
    color: #856404;
    margin: 0;
}

/* Files List */
.wp-tracker-files-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.wp-tracker-files-list table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wp-tracker-files-list th,
.wp-tracker-files-list td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.wp-tracker-files-list th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

.wp-tracker-files-list tr:last-child td {
    border-bottom: none;
}

.wp-tracker-files-list tr:hover td {
    background: #f8f9fa;
}

.wp-tracker-files-list .file-name {
    word-break: break-all;
}

.wp-tracker-files-list .file-size {
    white-space: nowrap;
    text-align: right;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-tracker-torrent-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wp-tracker-torrent-stats {
        width: 100%;
        justify-content: flex-start;
    }
    
    .wp-tracker-download-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   TORRENT ATTACHMENT DISPLAY - Clean WordPress Style
   ========================================================================== */

.torrent-attachments {
    margin: 25px 0;
    padding: 0;
}

.torrent-attachments-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0;
    color: #333;
}

.torrent-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    background: #fff;
}

.torrent-item:last-child {
    margin-bottom: 0;
}

/* Summary Line */
.torrent-summary {
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.6;
}

.torrent-summary .torrent-icon {
    margin-right: 5px;
}

.torrent-summary .torrent-name {
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
}

.torrent-summary .torrent-name:hover {
    text-decoration: underline;
}

.torrent-summary .torrent-stats {
    color: #666;
    font-size: 13px;
}

.torrent-summary .stat-s {
    color: #2e7d32;
    font-weight: 600;
}

.torrent-summary .stat-p {
    color: #1565c0;
    font-weight: 600;
}

.torrent-summary .stat-d {
    color: #6a1b9a;
    font-weight: 600;
}

.torrent-summary .untracked-notice {
    color: #999;
    font-style: italic;
}

/* Expand/Collapse Toggle */
.torrent-details-toggle {
    padding: 0 15px 12px 15px;
}

.torrent-expand-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    color: #555;
}

.torrent-expand-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.torrent-expand-btn .toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 5px;
}

.torrent-expand-btn.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* Details Wrapper */
.torrent-details-wrapper {
    border-top: 1px solid #eee;
}

/* Tabs */
.torrent-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    padding: 0;
}

.torrent-tab-btn {
    padding: 10px 15px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    cursor: pointer;
    color: #555;
    margin-bottom: -1px;
}

.torrent-tab-btn:hover {
    color: #0073aa;
}

.torrent-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: #fff;
}

/* Tab Content */
.torrent-tab-content {
    display: none;
    padding: 15px;
}

.torrent-tab-content.active {
    display: block;
}

/* Info Table */
.torrent-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.torrent-info-table th,
.torrent-info-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.torrent-info-table th {
    width: 140px;
    font-weight: 600;
    color: #333;
    background: #f9f9f9;
}

.torrent-info-table code {
    font-size: 11px;
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    word-break: break-all;
    display: inline-block;
}

.torrent-info-table .announce-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
}

.torrent-info-table .announce-list li {
    margin-bottom: 3px;
    word-break: break-all;
}

/* Data Tables (Files, Peers) */
.torrent-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.torrent-data-table th,
.torrent-data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.torrent-data-table th {
    font-weight: 600;
    background: #f9f9f9;
    color: #333;
}

.torrent-data-table .col-size {
    text-align: right;
    white-space: nowrap;
    width: 100px;
}

.torrent-data-table .speed-up {
    color: #2e7d32;
}

.torrent-data-table .speed-down {
    color: #1565c0;
}

/* Completed List */
.completed-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.completed-list li {
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #2e7d32;
}

/* Notice Box */
.torrent-notice {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 15px;
}

.torrent-notice-warning {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    color: #6d5c00;
}

/* No Data */
.no-data {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Download Row */
.torrent-download-row {
    padding: 12px 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.btn-download,
.btn-login {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.btn-download:hover {
    background: #005a87;
}

.btn-login {
    background: #666;
}

.btn-login:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 600px) {
    .torrent-info-table th {
        width: 100px;
    }
    
    .torrent-tab-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Tracker Status Indicator */
.torrent-attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.torrent-attachments-header .torrent-attachments-title {
    margin: 0;
}

.tracker-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tracker-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Online Status */
.tracker-status-online {
    background: #d4edda;
    color: #155724;
}

.tracker-status-online .tracker-status-dot {
    background: #28a745;
    box-shadow: 0 0 6px #28a745;
    animation: pulse-green 2s infinite;
}

/* Offline Status */
.tracker-status-offline {
    background: #f8d7da;
    color: #721c24;
}

.tracker-status-offline .tracker-status-dot {
    background: #dc3545;
}

/* Error Status */
.tracker-status-error {
    background: #fff3cd;
    color: #856404;
}

.tracker-status-error .tracker-status-dot {
    background: #ffc107;
}

/* Checking Status */
.tracker-status-checking {
    background: #e2e3e5;
    color: #6c757d;
}

.tracker-status-checking .tracker-status-dot {
    background: #6c757d;
    animation: pulse-gray 1s infinite;
}

/* Pulse Animations */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes pulse-gray {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Standalone Status Widget */
.tracker-status-widget {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.tracker-status-widget .tracker-status {
    font-size: 14px;
    padding: 6px 14px;
}

.tracker-status-widget .tracker-status-dot {
    width: 10px;
    height: 10px;
}