/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 20% 80%, var(--primary-color) 0px, transparent 50%),
        radial-gradient(at 80% 20%, var(--secondary-color) 0px, transparent 50%),
        radial-gradient(at 40% 40%, var(--primary-dark) 0px, transparent 50%);
    background-attachment: fixed;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

#file-input {
    display: none;
}

.upload-area label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area span {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
}

.upload-area small {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
}

#magnet-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#magnet-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#load-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#load-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#load-btn:active {
    transform: translateY(0);
}

/* Seeding Files */
.seeding-file {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.magnet-link-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.magnet-link {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: monospace;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.torrent-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.torrent-stats strong {
    color: var(--text-primary);
}

.stop-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stop-btn:hover {
    background: var(--error-color);
    color: white;
}

/* Content Display */
.file-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.file-container h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-iframe {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
}

.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.content-video,
.content-audio {
    width: 100%;
    border-radius: 0.5rem;
}

.content-text {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.download-link:hover {
    background: var(--primary-dark);
}

/* Status Messages */
#status-messages {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.status-message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.status-success {
    background: var(--success-color);
    color: white;
}

.status-error {
    background: var(--error-color);
    color: white;
}

.status-info {
    background: var(--info-color);
    color: white;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .seeding-file {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .torrent-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #status-messages {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .status-message {
        font-size: 0.875rem;
    }
} 