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

body {
    font-family: 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    direction: rtl;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* Video Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.8;
}

/* Glass-morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Hamburger menu styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hamburger animation when active */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Button Styles */
.logout-btn, .dashboard-btn, .upload-btn, .login-btn, .copy-btn, .action-btn, .settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logout-btn:hover, .dashboard-btn:hover, .upload-btn:hover, .login-btn:hover, .copy-btn:hover, .action-btn:hover, .settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.logout-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Container Styles */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* PIN Input Styles */
.pin-input-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pin-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    color: #495057;
}

.pin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.pin-input:disabled {
    background: rgba(248, 249, 250, 0.8);
    cursor: not-allowed;
}

/* Remove number input spinners */
.pin-input::-webkit-outer-spin-button,
.pin-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-input[type="number"] {
    -moz-appearance: textfield;
}

/* Upload Area */
.upload-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.upload-area:hover::before {
    opacity: 1;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.upload-area:hover {
    border-color: #764ba2;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.upload-area.dragover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: #6c757d;
    font-size: 1rem;
}

.file-input {
    display: none;
}

/* Options Section */
.options {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.option-group {
    margin-bottom: 2rem;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.1rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.radio-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.radio-option input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #667eea;
}

.radio-option input[type="radio"]:checked + label {
    color: #667eea;
    font-weight: 600;
}

/* Progress Container */
.progress-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(233, 236, 239, 0.8);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Result Container */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.download-link {
    background: rgba(248, 249, 250, 0.8);
    padding: 1rem;
    border-radius: 15px;
    margin: 1rem 0;
    word-break: break-all;
    font-family: monospace;
    border: 1px solid #dee2e6;
}

/* Dashboard Styles */
.dashboard-section {
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-header h2 {
    color: #495057;
    font-size: 2rem;
    font-weight: 700;
}

.uploads-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.upload-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.upload-info h3 {
    color: #495057;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.upload-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 15px;
}

.view-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.view-btn:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.delete-btn:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.files-preview {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 1rem;
    margin-top: 1rem;
}

.file-item-small {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.file-item-small:last-child {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.status-expired {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: rgba(220, 53, 69, 0.95);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Smooth transitions for page navigation */
.login-container,
.dashboard-section {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.login-container.fade-out,
.dashboard-section.fade-out {
    opacity: 0;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.error-message {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    margin-top: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .login-form {
        min-width: auto;
        margin: 1rem;
        padding: 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .upload-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .upload-actions {
        justify-content: center;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Email Button */
.email-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.email-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 2px solid #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.email-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.email-result.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.email-result.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .header-actions {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        padding: 10px;
        min-width: 200px;
        flex-direction: column;
        gap: 10px;
        z-index: 100;
    }
    
    .header-actions.mobile-open {
        display: flex;
    }
    
    .header-actions button {
        width: 100%;
        font-size: 0.9rem;
        padding: 1rem;
        text-align: center;
    }
    
    .header-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .upload-text {
        font-size: 1.2rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .login-form {
        min-width: auto;
        width: 100%;
        padding: 2rem 1.5rem;
    }
}

/* Email Autocomplete Styles */
.email-autocomplete {
    position: relative;
}

/* LTR direction for recipients email field */
#recipientEmails {
    direction: ltr;
    text-align: left;
}

.email-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
}

.email-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.email-suggestion:hover,
.email-suggestion.selected {
    background-color: #f8f9fa;
}

.email-suggestion:last-child {
    border-bottom: none;
}
