/* rotate-pdf.css */
:root {
    --primary-color: #4a6fa5;
    --primary-dark: #385d8a;
    --secondary-color: #6d9dc5;
    --accent-color: #7ae7c7;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --danger-color: #e63946;
    --success-color: #2a9d8f;
    --warning-color: #e9c46a;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.trust-note {
    background-color: #e8f4fc;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--box-shadow);
}

.trust-note i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
}

.upload-area {
    background-color: white;
    border: 3px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f8fcff;
    transform: translateY(-5px);
}

.upload-area i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.upload-area h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.9rem;
    color: #888;
    margin-top: 20px;
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.rotation-controls {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.rotation-controls h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.rotation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 500px) {
    .rotation-buttons {
        grid-template-columns: 1fr;
    }
}

.rotation-btn {
    padding: 15px;
    background-color: #f0f7ff;
    border: 2px solid #d1e3ff;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.rotation-btn:hover {
    background-color: #e1eeff;
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.rotation-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
    color: white;
}

.rotation-btn i {
    font-size: 1.8rem;
}

.selected-angle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
}

#selectedAngleDisplay {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.file-list-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.file-list-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    font-size: 1.8rem;
    color: var(--danger-color);
}

.file-details h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.file-details p {
    color: #666;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.file-actions button:hover {
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #21867a;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.status-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.status-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-box {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.status-box.processing {
    background-color: #fff8e1;
    border-left: 4px solid var(--warning-color);
}

.status-box.success {
    background-color: #e8f5e9;
    border-left: 4px solid var(--success-color);
}

.status-box.error {
    background-color: #ffebee;
    border-left: 4px solid var(--danger-color);
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

.footer i {
    color: var(--danger-color);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}