/* File Transfer Panel Styles */
.file-transfer-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #2a2a2a;
    border-left: 2px solid #4a9eff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    color: #ffffff;
}

.file-transfer-panel.show {
    right: 0;
}

.file-transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #444;
}

.file-transfer-header h3 {
    margin: 0;
    color: #4a9eff;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #444;
}

.file-transfer-content {
    padding: 20px;
}

.file-transfer-content h4 {
    margin: 0 0 15px 0;
    color: #4a9eff;
    font-size: 16px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #666;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #4a9eff;
    background: #1e1e1e;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 0;
    color: #ccc;
    font-size: 14px;
}

.upload-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #66b3ff);
    transition: width 0.3s ease;
    width: 0%;
}

#upload-status {
    font-size: 12px;
    color: #ccc;
}

/* Download Section */
.download-section {
    margin-bottom: 30px;
}

.calculator-files {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 100px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #444;
}

.file-info {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 4px;
}

.file-type {
    display: block;
    font-size: 12px;
    color: #4a9eff;
    margin-bottom: 2px;
}

.file-size {
    display: block;
    font-size: 11px;
    color: #888;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.btn-download,
.btn-delete {
    background: none;
    border: 1px solid #444;
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #4a9eff;
    border-color: #4a9eff;
}

.btn-delete:hover {
    background: #ff4444;
    border-color: #ff4444;
}

/* File Management */
.file-management {
    margin-bottom: 30px;
}

.file-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: #4a9eff;
    color: #ffffff;
}

.btn-primary:hover {
    background: #3a8eef;
}

.btn-secondary {
    background: #666;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #777;
}

.btn-danger {
    background: #ff4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #ee3333;
}

/* Error states */
.error {
    color: #ff4444;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* File Transfer Toggle Button */
.file-transfer-toggle {
    position: fixed;
    top: 20px;
    right: 150px;
    background: #4a9eff;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.file-transfer-toggle:hover {
    background: #3a8eef;
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .file-transfer-panel {
        width: 100%;
        right: -100%;
    }
    
    .file-transfer-toggle {
        display: none !important;
    }
}

/* Animation for panel */
@keyframes slideIn {
    from {
        right: -400px;
    }
    to {
        right: 0;
    }
}

@keyframes slideOut {
    from {
        right: 0;
    }
    to {
        right: -400px;
    }
}

/* Desktop Install App Button */
.desktop-install-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.desktop-install-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.desktop-install-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

/* Hide desktop install button on mobile */
@media (max-width: 768px) {
    .desktop-install-button {
        display: none !important;
    }
}