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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
        min-height: 100vh;
    }
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

@media (max-width: 768px) {
    .header {
        margin-bottom: 30px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .header {
        margin-bottom: 25px;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 0 15px;
        line-height: 1.4;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .main-content {
        padding: 25px;
        border-radius: 20px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 10px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.1);
    }
}

/* Company Section */
.company-section {
    margin-bottom: 30px;
}

.company-input-container {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 18px;
    padding: 28px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .company-section {
        margin-bottom: 25px;
    }
    
    .company-input-container {
        padding: 22px;
        border-radius: 16px;
    }
    
    .company-label {
        font-size: 1rem;
        margin-bottom: 12px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .company-input {
        padding: 14px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .company-section {
        margin-bottom: 20px;
    }
    
    .company-input-container {
        padding: 18px;
        border-radius: 14px;
    }
    
    .company-label {
        font-size: 0.95rem;
        margin-bottom: 10px;
        gap: 8px;
    }
    
    .company-label i {
        font-size: 1.1rem;
    }
    
    .company-input {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
    }
}

.company-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 0 2px 2px 0;
}

.company-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.company-label i {
    color: #667eea;
    font-size: 1.2rem;
}

.company-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(233, 236, 239, 0.8);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.company-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 25px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

.company-input::placeholder {
    color: #adb5bd;
}

/* Upload Area */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #fafafa, #ffffff);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .upload-section {
        margin-bottom: 25px;
    }
    
    .upload-area {
        padding: 40px 15px;
        border-radius: 16px;
        min-height: 180px;
        border-width: 2px;
    }
    
    .upload-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .upload-area h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .upload-area p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .upload-section {
        margin-bottom: 20px;
    }
    
    .upload-area {
        padding: 30px 12px;
        border-radius: 14px;
        min-height: 160px;
        border-width: 2px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .upload-area p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .supported-formats {
        margin-top: 20px;
    }
    
    .supported-formats p {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    
    .format-tags {
        gap: 6px;
        justify-content: center;
    }
    
    .format-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
        border-radius: 16px;
    }
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(145deg, #f0f4ff, #ffffff);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: linear-gradient(145deg, #e8f0ff, #f8faff);
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.upload-area.drag-over::before {
    opacity: 1;
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-area p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}


.supported-formats {
    margin-top: 30px;
}

.supported-formats p {
    margin-bottom: 15px;
    color: #666;
    font-weight: 500;
}

.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.format-tag {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Files Section */
.files-section {
    margin-bottom: 30px;
}

.files-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.files-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .files-section {
        margin-bottom: 25px;
    }
    
    .files-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .files-list {
        max-height: 250px;
    }
    
    .file-item {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .file-info {
        gap: 12px;
    }
    
    .file-icon {
        font-size: 1.3rem;
        width: 25px;
    }
    
    .file-name {
        font-size: 0.95rem;
    }
    
    .file-size {
        font-size: 0.85rem;
    }
    
    .remove-file {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .files-section {
        margin-bottom: 20px;
    }
    
    .files-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .files-list {
        max-height: 200px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        position: relative;
    }
    
    .file-info {
        width: 100%;
        gap: 10px;
    }
    
    .file-icon {
        font-size: 1.2rem;
        width: 22px;
    }
    
    .file-details {
        flex: 1;
        min-width: 0;
    }
    
    .file-name {
        font-size: 0.9rem;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .file-size {
        font-size: 0.8rem;
    }
    
    .remove-file {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
}

.file-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-icon {
    font-size: 1.5rem;
    color: #667eea;
    width: 30px;
    text-align: center;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .upload-actions {
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        min-width: 200px;
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .upload-actions {
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 10px;
        gap: 8px;
    }
    
    .btn i {
        font-size: 1.1rem;
    }
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn:disabled::before {
    display: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(108, 117, 125, 0.4);
}

/* Progress Section */
.progress-section {
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .progress-section {
        margin-bottom: 25px;
    }
    
    .progress-bar {
        height: 10px;
        margin-bottom: 12px;
    }
    
    .progress-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .progress-section {
        margin-bottom: 20px;
    }
    
    .progress-bar {
        height: 8px;
        margin-bottom: 10px;
        border-radius: 10px;
    }
    
    .progress-fill {
        border-radius: 10px;
    }
    
    .progress-text {
        font-size: 0.9rem;
        padding: 0 10px;
        text-align: center;
        word-break: break-word;
    }
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(233, 236, 239, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
    border-radius: 12px 12px 0 0;
}

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* Results Section */
.results-section {
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .results-section {
        margin-bottom: 25px;
    }
    
    .results-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .result-message {
        padding: 16px;
        border-radius: 8px;
    }
    
    .result-success h4,
    .result-error h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .result-success i,
    .result-error i {
        font-size: 1.3rem;
        margin-right: 8px;
    }
    
    .result-success p,
    .result-error p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .result-success ul,
    .result-error ul {
        margin-left: 15px;
        margin-top: 8px;
    }
    
    .result-success li,
    .result-error li {
        font-size: 0.9rem;
        margin-bottom: 4px;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .results-section {
        margin-bottom: 20px;
    }
    
    .results-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .result-message {
        padding: 14px;
        border-radius: 6px;
    }
    
    .result-success h4,
    .result-error h4 {
        font-size: 1rem;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }
    
    .result-success i,
    .result-error i {
        font-size: 1.2rem;
        margin-right: 6px;
    }
    
    .result-success p,
    .result-error p {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .result-success ul,
    .result-error ul {
        margin-left: 12px;
        margin-top: 6px;
    }
    
    .result-success li,
    .result-error li {
        font-size: 0.85rem;
        margin-bottom: 3px;
        word-break: break-word;
        line-height: 1.3;
    }
}

.results-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.result-message {
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.result-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.result-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.result-success i,
.result-error i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.result-success h4,
.result-error h4 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.result-success ul,
.result-error ul {
    margin-left: 20px;
    margin-top: 10px;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .footer {
        font-size: 0.85rem;
        margin-top: 15px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .footer {
        font-size: 0.8rem;
        margin-top: 10px;
        padding: 0 15px;
        line-height: 1.3;
    }
}


/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* File input hidden */
#fileInput {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Mobile-specific styles */
.mobile-device .upload-area {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
}

.mobile-device .upload-area.touch-active {
    background: linear-gradient(145deg, #e8f0ff, #f8faff);
    transform: scale(0.98);
    transition: all 0.1s ease;
}

.mobile-device .btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.mobile-device .company-input {
    -webkit-appearance: none;
    appearance: none;
}

/* CSS Variables for responsive font sizes */
:root {
    --base-font-size: 16px;
}

.mobile-device {
    font-size: var(--base-font-size);
}


/* Custom Scrollbar */
.files-list::-webkit-scrollbar {
    width: 8px;
}

.files-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.files-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.files-list::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}
