/* 
 * QuickSharePhotos - Upload Page Styles
 */

body.upload-page {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 700px;
    width: 100%;
}

.upload-header {
    text-align: center;
    margin-bottom: 30px;
}

.upload-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.upload-header p {
    color: #666;
    font-size: 1.1em;
}

.nav-links {
    text-align: center;
    margin-bottom: 20px;
}

.nav-links a {
    color: var(--primary-start);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: #f0f0ff;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: #fafafa;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-start);
    background: #f0f0ff;
}

.upload-area.drag-over {
    border-color: var(--primary-start);
    background: #e6f3ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
}

.upload-text {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.upload-hint {
    color: #999;
    font-size: 0.9em;
}

#fileInput {
    display: none;
}

/* Rotation Hint */
.rotation-hint {
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #4a6fa5;
    font-size: 0.9em;
    display: none;
}

.rotation-hint.visible {
    display: block;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.file-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary-start);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.file-item.converting {
    opacity: 0.7;
}

.file-preview-container {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #eee;
}

.file-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-info {
    padding: 8px;
    text-align: center;
}

.file-name {
    font-size: 11px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.file-size {
    font-size: 10px;
    color: #888;
}

.file-status {
    font-size: 10px;
    color: var(--primary-start);
    font-weight: 500;
}

/* Remove Button */
.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-file:hover {
    background: var(--danger-hover);
    transform: scale(1.1);
}

/* Rotate Controls */
.rotate-controls {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.rotate-btn {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 5px;
    width: 32px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.rotate-btn:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

/* Converting Overlay */
.converting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 15;
}

.converting-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

.converting-text {
    font-size: 11px;
    font-weight: 500;
}

/* Upload Button */
.upload-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Message (upload specific - display none by default) */
.upload-container .message {
    margin-top: 20px;
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .upload-container {
        padding: 20px;
    }
    
    .upload-header h1 {
        font-size: 2em;
    }
    
    .upload-area {
        padding: 40px 15px;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .file-preview-container {
        height: 120px;
    }
}
