/* Complete TerraViz Styles */
/* assets/css/terraviz-enhanced.css */

:root {
    --terraviz-primary: #667eea;
    --terraviz-primary-dark: #5a67d8;
    --terraviz-secondary: #e2e8f0;
    --terraviz-success: #48bb78;
    --terraviz-warning: #ed8936;
    --terraviz-error: #e53e3e;
    --terraviz-text: #2d3748;
    --terraviz-text-light: #718096;
    --terraviz-bg: #f7fafc;
    --terraviz-white: #ffffff;
    --terraviz-shadow: 0 10px 25px rgba(0,0,0,0.1);
    --terraviz-shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --terraviz-radius: 12px;
    --terraviz-radius-lg: 20px;
}

/* Layout */
#terraviz-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--terraviz-text);
}

/* Card Styles */
.terraviz-upload-card,
.terraviz-files-card,
.terraviz-generation-card,
.terraviz-results-card {
    background: var(--terraviz-white);
    border-radius: var(--terraviz-radius-lg);
    box-shadow: var(--terraviz-shadow-lg);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.terraviz-card-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--terraviz-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terraviz-card-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--terraviz-text);
}

.terraviz-card-header p {
    margin: 0;
    color: var(--terraviz-text-light);
    font-size: 1rem;
}

/* Upload Section */
.terraviz-upload-section {
    padding: 40px;
}

.terraviz-upload-zone {
    border: 3px dashed var(--terraviz-primary);
    border-radius: var(--terraviz-radius);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.1) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.terraviz-upload-zone:hover,
.terraviz-upload-zone.terraviz-dragover {
    border-color: var(--terraviz-primary-dark);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.2) 100%);
    transform: translateY(-2px);
}

.terraviz-upload-icon {
    margin-bottom: 20px;
    color: var(--terraviz-primary);
}

.terraviz-upload-icon svg {
    width: 64px;
    height: 64px;
}

.terraviz-upload-text h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--terraviz-text);
}

.terraviz-upload-text p {
    color: var(--terraviz-text-light);
    font-size: 1rem;
    margin-bottom: 25px;
}

.terraviz-upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.terraviz-file-input {
    display: none;
}

/* Button Styles */
.terraviz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--terraviz-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    background: var(--terraviz-secondary);
    color: var(--terraviz-text);
}

.terraviz-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--terraviz-shadow);
}

.terraviz-btn-primary {
    background: linear-gradient(135deg, var(--terraviz-primary) 0%, var(--terraviz-primary-dark) 100%);
    color: var(--terraviz-white);
}

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

.terraviz-btn-secondary {
    background: var(--terraviz-secondary);
    color: var(--terraviz-text);
}

.terraviz-btn-secondary:hover {
    background: #cbd5e0;
}

.terraviz-btn-danger {
    background: var(--terraviz-error);
    color: var(--terraviz-white);
}

.terraviz-btn-danger:hover {
    background: #c53030;
}

.terraviz-btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    min-width: auto;
}

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

.terraviz-btn-full {
    width: 100%;
}

/* Progress Section */
.terraviz-progress-section {
    padding: 30px 40px;
    text-align: center;
}

.terraviz-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.terraviz-progress-header h3 {
    margin: 0;
    color: var(--terraviz-text);
}

.terraviz-btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--terraviz-text-light);
    padding: 5px;
    line-height: 1;
}

.terraviz-btn-close:hover {
    color: var(--terraviz-error);
}

.terraviz-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--terraviz-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.terraviz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--terraviz-primary) 0%, var(--terraviz-success) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.terraviz-progress-text {
    font-size: 0.875rem;
    color: var(--terraviz-text-light);
}

/* File Actions */
.terraviz-file-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* File List */
.terraviz-file-list {
    padding: 0 40px 40px;
}

.terraviz-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: var(--terraviz-bg);
    border-radius: var(--terraviz-radius);
    border-left: 4px solid var(--terraviz-primary);
    transition: all 0.3s ease;
}

.terraviz-file-item:hover {
    background: #edf2f7;
    transform: translateX(2px);
}

.terraviz-file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.terraviz-file-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.terraviz-file-details {
    flex: 1;
}

.terraviz-file-name {
    font-weight: 600;
    color: var(--terraviz-text);
    margin-bottom: 4px;
}

.terraviz-file-meta {
    font-size: 0.875rem;
    color: var(--terraviz-text-light);
}

.terraviz-btn-view {
    background: var(--terraviz-success);
    color: var(--terraviz-white);
}

.terraviz-btn-remove {
    background: var(--terraviz-error);
    color: var(--terraviz-white);
}

/* Export Section */
.terraviz-export-section {
    padding: 30px 40px;
    background: var(--terraviz-bg);
    border-top: 1px solid var(--terraviz-secondary);
}

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

.terraviz-export-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--terraviz-text);
}

.terraviz-export-header p {
    color: var(--terraviz-text-light);
    margin: 0;
}

.terraviz-export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.terraviz-btn-export {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--terraviz-white);
    border: 2px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    text-decoration: none;
    color: var(--terraviz-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.terraviz-btn-export:hover {
    border-color: var(--terraviz-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: var(--terraviz-shadow);
}

.terraviz-btn-icon {
    margin-right: 15px;
    color: var(--terraviz-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.terraviz-btn-text {
    flex: 1;
}

.terraviz-btn-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.terraviz-btn-text span {
    font-size: 0.875rem;
    color: var(--terraviz-text-light);
}

/* Generation Progress */
.terraviz-generation-progress {
    padding: 40px;
}

.terraviz-generation-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.terraviz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

.terraviz-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--terraviz-secondary);
    z-index: 1;
}

.terraviz-step.active::after {
    background: var(--terraviz-primary);
}

.terraviz-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--terraviz-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.terraviz-step.active .terraviz-step-icon {
    background: var(--terraviz-primary);
    color: var(--terraviz-white);
    animation: pulse 1.5s infinite;
}

.terraviz-step.completed .terraviz-step-icon {
    background: var(--terraviz-success);
    color: var(--terraviz-white);
    animation: none;
}

.terraviz-step-text {
    font-size: 0.875rem;
    color: var(--terraviz-text-light);
}

.terraviz-step.active .terraviz-step-text {
    color: var(--terraviz-text);
    font-weight: 600;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Results Section */
.terraviz-results-content {
    padding: 40px;
}

.terraviz-results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    padding: 30px;
    background: var(--terraviz-bg);
    border-radius: var(--terraviz-radius);
}

.terraviz-result-stat {
    text-align: center;
}

.terraviz-result-stat strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--terraviz-primary);
    margin-bottom: 5px;
}

.terraviz-result-stat span {
    font-size: 0.875rem;
    color: var(--terraviz-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terraviz-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.terraviz-results-preview {
    background: var(--terraviz-white);
    border: 1px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    padding: 30px;
}

.terraviz-results-preview h3 {
    margin-top: 0;
    color: var(--terraviz-text);
    border-bottom: 2px solid var(--terraviz-primary);
    padding-bottom: 10px;
}

.terraviz-category {
    margin-bottom: 25px;
}

.terraviz-category h4 {
    color: var(--terraviz-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.terraviz-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terraviz-category li {
    padding: 8px 15px;
    margin-bottom: 5px;
    background: var(--terraviz-bg);
    border-radius: 6px;
    font-size: 0.9rem;
    border-left: 3px solid var(--terraviz-primary);
}

/* Pricing Section */
.terraviz-pricing-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--terraviz-bg) 0%, #ffffff 100%);
    border-radius: var(--terraviz-radius-lg);
    margin-top: 40px;
}

.terraviz-pricing-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.terraviz-pricing-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--terraviz-text);
    margin-bottom: 15px;
}

.terraviz-pricing-header p {
    font-size: 1.2rem;
    color: var(--terraviz-text-light);
}

.terraviz-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.terraviz-pricing-card {
    background: var(--terraviz-white);
    border-radius: var(--terraviz-radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--terraviz-shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.terraviz-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--terraviz-shadow-lg);
}

.terraviz-pricing-popular {
    border-color: var(--terraviz-primary);
    transform: scale(1.05);
}

.terraviz-popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--terraviz-primary);
    color: var(--terraviz-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.terraviz-pricing-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--terraviz-text);
    margin-bottom: 20px;
}

.terraviz-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--terraviz-primary);
    margin-bottom: 30px;
}

.terraviz-price-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--terraviz-text-light);
}

.terraviz-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.terraviz-features-list li {
    padding: 10px 0;
    color: var(--terraviz-text);
    position: relative;
    padding-left: 25px;
}

.terraviz-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--terraviz-success);
    font-weight: bold;
}

/* Messages */
.terraviz-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.terraviz-message {
    margin-bottom: 10px;
    border-radius: var(--terraviz-radius);
    box-shadow: var(--terraviz-shadow);
    animation: slideInRight 0.3s ease;
}

.terraviz-message-content {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.terraviz-message-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--terraviz-success);
}

.terraviz-message-error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid var(--terraviz-error);
}

.terraviz-message-warning {
    background: #feebc8;
    color: #c05621;
    border-left: 4px solid var(--terraviz-warning);
}

.terraviz-message-info {
    background: #bee3f8;
    color: #2c5282;
    border-left: 4px solid var(--terraviz-primary);
}

.terraviz-message-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.terraviz-message-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Debug Styles */
.terraviz-debug {
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    border-left: 4px solid var(--terraviz-warning);
}

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

.terraviz-modal-content {
    background: var(--terraviz-white);
    border-radius: var(--terraviz-radius-lg);
    box-shadow: var(--terraviz-shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.terraviz-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--terraviz-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terraviz-modal-header h3 {
    margin: 0;
    color: var(--terraviz-text);
    font-size: 1.25rem;
}

.terraviz-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--terraviz-text-light);
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.terraviz-modal-close:hover {
    color: var(--terraviz-error);
    background: rgba(231, 76, 60, 0.1);
}

.terraviz-modal-body {
    padding: 30px;
}

.terraviz-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--terraviz-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Option Groups */
.terraviz-option-group {
    margin-bottom: 25px;
}

.terraviz-option-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--terraviz-text);
    font-weight: 500;
}

.terraviz-option-group label input[type="checkbox"] {
    margin-right: 8px;
}

.terraviz-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    font-size: 1rem;
    color: var(--terraviz-text);
    background: var(--terraviz-white);
    transition: border-color 0.2s ease;
}

.terraviz-select:focus {
    outline: none;
    border-color: var(--terraviz-primary);
}

/* Format Options */
.terraviz-format-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.terraviz-format-btn {
    padding: 15px 10px;
    border: 2px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    background: var(--terraviz-white);
    color: var(--terraviz-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.terraviz-format-btn:hover {
    border-color: var(--terraviz-primary);
    background: rgba(102, 126, 234, 0.05);
}

.terraviz-format-btn.active {
    border-color: var(--terraviz-primary);
    background: var(--terraviz-primary);
    color: var(--terraviz-white);
}

/* Enhanced Resource Preview */
.terraviz-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.terraviz-resource-item {
    padding: 12px 15px;
    background: var(--terraviz-bg);
    border-radius: var(--terraviz-radius);
    border-left: 4px solid var(--terraviz-primary);
    transition: all 0.2s ease;
}

.terraviz-resource-item:hover {
    background: var(--terraviz-secondary);
    transform: translateX(2px);
}

.terraviz-resource-name {
    font-weight: 600;
    color: var(--terraviz-text);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.terraviz-resource-type {
    font-size: 0.8rem;
    color: var(--terraviz-text-light);
}

.terraviz-more-resources {
    opacity: 0.7;
    font-style: italic;
    border-left-color: var(--terraviz-text-light);
}

/* Metadata Section */
.terraviz-metadata-section {
    margin-top: 30px;
    border-top: 1px solid var(--terraviz-secondary);
    padding-top: 20px;
}

.terraviz-metadata-section details {
    border: 1px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    padding: 15px;
}

.terraviz-metadata-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--terraviz-text);
    padding: 5px 0;
}

.terraviz-metadata-section summary:hover {
    color: var(--terraviz-primary);
}

.terraviz-metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.terraviz-metadata-item {
    padding: 10px;
    background: var(--terraviz-bg);
    border-radius: var(--terraviz-radius);
    font-size: 0.9rem;
}

.terraviz-metadata-item strong {
    color: var(--terraviz-text);
    display: block;
    margin-bottom: 4px;
}

/* Enhanced File List */
.terraviz-file-item {
    position: relative;
    overflow: hidden;
}

.terraviz-file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--terraviz-primary), var(--terraviz-success));
    transition: width 0.3s ease;
}

.terraviz-file-item:hover::before {
    width: 8px;
}

/* File Analysis Tooltip */
.terraviz-file-analysis {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--terraviz-white);
    border: 1px solid var(--terraviz-secondary);
    border-radius: var(--terraviz-radius);
    padding: 15px;
    box-shadow: var(--terraviz-shadow);
    z-index: 1000;
    display: none;
    animation: fadeInUp 0.2s ease;
}

.terraviz-file-item:hover .terraviz-file-analysis {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.terraviz-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.terraviz-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--terraviz-secondary);
    border-top: 2px solid var(--terraviz-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Animations */
.terraviz-success-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--terraviz-success);
    position: relative;
    display: inline-block;
}

.terraviz-success-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Progress Enhancements */
.terraviz-progress-bar {
    position: relative;
    overflow: visible;
}

.terraviz-progress-fill {
    position: relative;
}

.terraviz-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 4px 4px 0;
    animation: shimmer 1s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --terraviz-bg: #1a1a1a;
        --terraviz-white: #2d2d2d;
        --terraviz-text: #e0e0e0;
        --terraviz-text-light: #a0a0a0;
        --terraviz-secondary: #404040;
    }
    
    .terraviz-modal {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Print Styles */
@media print {
    .terraviz-modal,
    .terraviz-messages,
    .terraviz-upload-section,
    .terraviz-progress-section {
        display: none !important;
    }
    
    .terraviz-results-preview {
        break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .terraviz-btn,
    .terraviz-file-item,
    .terraviz-modal-content {
        border-width: 2px;
    }
    
    .terraviz-progress-fill {
        background: #000;
    }
}

/* Focus Styles for Keyboard Navigation */
.terraviz-btn:focus,
.terraviz-select:focus,
.terraviz-format-btn:focus {
    outline: 2px solid var(--terraviz-primary);
    outline-offset: 2px;
}

/* Tooltip Styles */
.terraviz-tooltip {
    position: relative;
}

.terraviz-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--terraviz-text);
    color: var(--terraviz-white);
    padding: 8px 12px;
    border-radius: var(--terraviz-radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    #terraviz-app {
        padding: 10px;
    }
    
    .terraviz-card-header {
        padding: 20px 25px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .terraviz-upload-section,
    .terraviz-file-list,
    .terraviz-export-section,
    .terraviz-generation-progress,
    .terraviz-results-content {
        padding: 25px 20px;
    }
    
    .terraviz-upload-zone {
        padding: 40px 20px;
        min-height: 150px;
    }
    
    .terraviz-upload-buttons {
        flex-direction: column;
    }
    
    .terraviz-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .terraviz-file-actions {
        align-self: stretch;
        justify-content: flex-end;
    }
    
    .terraviz-export-buttons {
        grid-template-columns: 1fr;
    }
    
    .terraviz-generation-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .terraviz-step:not(:last-child)::after {
        display: none;
    }
    
    .terraviz-results-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .terraviz-results-actions {
        flex-direction: column;
    }
    
    .terraviz-pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .terraviz-pricing-popular {
        transform: none;
    }
    
    .terraviz-messages {
        position: relative;
        top: auto;
        right: auto;
        max-width: none;
        margin: 20px 0;
    }
    
    /* Modal Responsive */
    .terraviz-modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .terraviz-modal-header,
    .terraviz-modal-body,
    .terraviz-modal-footer {
        padding: 15px 20px;
    }
    
    .terraviz-format-options {
        grid-template-columns: 1fr;
    }
    
    .terraviz-metadata-grid {
        grid-template-columns: 1fr;
    }
    
    .terraviz-resource-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .terraviz-card-header h2 {
        font-size: 1.5rem;
    }
    
    .terraviz-upload-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .terraviz-upload-text h3 {
        font-size: 1.2rem;
    }
    
    .terraviz-btn {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .terraviz-pricing-header h2 {
        font-size: 2rem;
    }
    
    .terraviz-price {
        font-size: 2.5rem;
    }
    
    .terraviz-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .terraviz-format-btn {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .terraviz-card-header h2 {
        font-size: 1.5rem;
    }
    
    .terraviz-upload-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .terraviz-upload-text h3 {
        font-size: 1.2rem;
    }
    
    .terraviz-btn {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .terraviz-pricing-header h2 {
        font-size: 2rem;
    }
    
    .terraviz-price {
        font-size: 2.5rem;
    }
}