/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 2rem 2rem;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 2rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

/* App Section (Left Side) */
.app-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Nagłówek */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7B4BFF 0%, #9D6BFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    font-weight: 300;
}

/* Formularz */
form {
    background: rgba(30, 30, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 75, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(123, 75, 255, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

textarea:focus, select:focus {
    outline: none;
    border-color: #7B4BFF;
    box-shadow: 0 0 0 2px rgba(123, 75, 255, 0.2);
    background: rgba(25, 25, 40, 0.9);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237B4BFF' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

/* Przycisk */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #7B4BFF 0%, #9D6BFF 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 75, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Sekcja odpowiedzi */
.response-section {
    background: rgba(30, 30, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 75, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.placeholder {
    color: #888;
    font-style: italic;
    text-align: center;
    font-size: 1.1rem;
}

.response-content {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.7;
    width: 100%;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(123, 75, 255, 0.3);
    border-radius: 50%;
    border-top-color: #7B4BFF;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    form, .response-section {
        padding: 1.5rem;
    }
    
    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    form, .response-section {
        padding: 1rem;
    }
}

/* Document Upload Styles */
.document-upload-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.file-input-wrapper {
    flex: 1;
    min-width: 120px;
}

.file-input {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(20, 20, 35, 0.8);
    border: 2px dashed rgba(123, 75, 255, 0.3);
    border-radius: 8px;
    color: #b0b0b0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
}

.file-input-label:hover {
    border-color: #7B4BFF;
    background: rgba(25, 25, 40, 0.9);
    color: #e0e0e0;
}

.file-input-label svg {
    flex-shrink: 0;
}

.file-info {
    margin-bottom: 1rem;
}

.file-info small {
    color: #888;
    font-size: 0.8rem;
}

.file-previews {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(123, 75, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.file-preview-name {
    color: #e0e0e0;
    font-weight: 500;
}

.file-preview-size {
    color: #888;
    font-size: 0.8rem;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.file-preview-remove:hover {
    background: rgba(248, 113, 113, 0.1);
}

.file-preview-remove svg {
    width: 16px;
    height: 16px;
}

/* Security Notice Styles */
.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    margin-top: 1rem;
}

.security-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.security-text {
    color: #fbbf24;
    font-size: 0.9rem;
    line-height: 1.4;
}

.security-text strong {
    color: #f59e0b;
}

/* Responsive file upload */
@media (max-width: 768px) {
    .document-upload-container {
        flex-direction: column;
    }
    
    .file-input-wrapper {
        min-width: auto;
    }
    
    .security-notice {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .security-icon {
        margin-top: 0;
    }
}

/* Comparison Section Styles */
.comparison-section {
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 75, 255, 0.3);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-header h2 {
    color: #7B4BFF;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.comparison-subtitle {
    color: #b0b0b0;
    font-size: 1rem;
    margin: 0;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comparison-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.column-header {
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 2px solid;
}

.competitor-header {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.our-header {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

.comparison-feature-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(20, 20, 35, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(123, 75, 255, 0.2);
}

.feature-title {
    color: #7B4BFF;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.comparison-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.comparison-column {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comparison-column.competitor {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.comparison-column.our {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.feature-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start;
}

.feature-badge.positive {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.4);
}

.feature-badge.negative {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.comparison-column p {
    margin: 0;
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.comparison-cta {
    text-align: center;
    padding: 1.5rem;
    background: rgba(123, 75, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(123, 75, 255, 0.3);
}

.comparison-cta h3 {
    color: #7B4BFF;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.comparison-cta p {
    color: #b0b0b0;
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive design for new grid layout */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .comparison-section {
        margin-bottom: 0;
    }
}

/* Responsive comparison section */
@media (max-width: 768px) {
    .comparison-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .header-row {
        display: none;
    }
    
    .comparison-cell {
        padding: 0.75rem;
    }
    
    .comparison-header h2 {
        font-size: 1.5rem;
    }
    
    .comparison-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .comparison-section {
        padding: 1rem;
    }
    
    .comparison-header h2 {
        font-size: 1.3rem;
    }
    
    .feature-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .comparison-cell p {
        font-size: 0.9rem;
    }
}
