* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1a4a4a, #2d6666);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: background 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px solid #008080;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header {
    background: linear-gradient(135deg, #008080 0%, #006666 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #00a0a0;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 204, 204, 0.5);
}

.header p {
    font-size: 1em;
    opacity: 0.9;
}

.content {
    padding: 30px;
    background: rgba(45, 45, 45, 0.8);
}

.upload-section {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #008080;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
}

.upload-section:hover {
    border-color: #00a0a0;
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.3);
}

.upload-section.dragover {
    border-color: #00cccc;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 8px 25px rgba(0, 204, 204, 0.4);
}

.upload-icon {
    font-size: 3em;
    color: #008080;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(0, 128, 128, 0.5);
}

.upload-text {
    font-size: 1.2em;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-subtext {
    color: #cccccc;
    font-size: 0.9em;
}

#folderInput {
    display: none;
}

.progress-container {
    display: none;
    margin: 25px 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 128, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #008080, #00a0a0);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: #00cccc;
    font-size: 0.9em;
    font-weight: bold;
}

.status {
    margin: 20px 0;
    padding: 15px;
    border-radius: 6px;
    display: none;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.status.success {
    background: linear-gradient(135deg, #1a4a3a, #2d6b4a);
    color: #66ff66;
    border: 1px solid #008040;
    box-shadow: 0 4px 15px rgba(0, 128, 64, 0.3);
}

.status.error {
    background: linear-gradient(135deg, #4a1a1a, #6b2d2d);
    color: #ff6666;
    border: 1px solid #800020;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.status.info {
    background: linear-gradient(135deg, #1a3a4a, #2d5a6b);
    color: #66ccff;
    border: 1px solid #004080;
    box-shadow: 0 4px 15px rgba(0, 64, 128, 0.3);
}

.stats {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(0, 128, 128, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.3);
    border-color: #00a0a0;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: #00a0a0;
    text-shadow: 0 0 10px rgba(0, 160, 160, 0.5);
}

.stat-label {
    color: #cccccc;
    margin-top: 8px;
    font-size: 0.9em;
}

.results {
    display: none;
    margin-top: 30px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 128, 128, 0.3);
    gap: 5px;
}

.tab {
    background: rgba(0, 0, 0, 0.3);
    color: #cccccc;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-top: 2px solid rgba(0, 128, 128, 0.3);
    border-left: 1px solid rgba(0, 128, 128, 0.2);
    border-right: 1px solid rgba(0, 128, 128, 0.2);
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.tab:hover {
    background: rgba(0, 128, 128, 0.1);
    color: #ffffff;
    border-top-color: #00a0a0;
}

.tab.active {
    background: linear-gradient(45deg, #008080, #00a0a0);
    color: white;
    border-top-color: #00cccc;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 128, 0.3);
}

.attachment-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 128, 128, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.attachment-card:hover {
    border-color: #008080;
    background: rgba(0, 128, 128, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 128, 128, 0.3);
}

.widget-info {
    color: #00a0a0;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 0 0 5px rgba(0, 160, 160, 0.5);
}

.group-badge {
    background: linear-gradient(45deg, #008080, #00a0a0);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 128, 128, 0.3);
}

.macro-info {
    margin-top: 8px;
}

.macro-number {
    color: #00cccc;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 8px rgba(0, 204, 204, 0.5);
}

.macro-name {
    color: #ffffff;
    margin-top: 5px;
    font-style: italic;
    word-wrap: break-word;
}

.code-view {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 128, 128, 0.3);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.4;
    color: #cccccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download-btn {
    background: linear-gradient(135deg, #008080 0%, #006666 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
    font-weight: 500;
}

.download-btn:hover {
    background: linear-gradient(135deg, #00a0a0 0%, #008080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4);
}

.filter-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 128, 128, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 128, 128, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    width: 100%;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #008080;
    box-shadow: 0 0 10px rgba(0, 128, 128, 0.3);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 128, 128, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 128, 128, 0.7);
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(0, 128, 128, 0.3);
    font-size: 0.8em;
    color: #cccccc;
    background: rgba(0, 0, 0, 0.2);
}

footer a {
    color: #008080;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #00a0a0;
    text-shadow: 0 0 5px rgba(0, 160, 160, 0.5);
}

/* GVV Updater specific styles */
#gvvNotProcessed {
    text-align: center;
    padding: 40px;
    color: #cccccc;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 128, 0.2);
}

#gvvProcessed {
    display: none;
}

#gvvDownloadBtn {
    background: linear-gradient(135deg, #008080 0%, #006666 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
    font-weight: bold;
}

#gvvDownloadBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00a0a0 0%, #008080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4);
}

#gvvDownloadBtn:disabled {
    background: #555;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* Modal and overlay improvements */
.modal {
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a4a4a, #2d6666);
    border: 3px solid #008080;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Enhanced info grid styling */
#gvvInfoGrid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    font-size: 0.9em;
}

#gvvInfoGrid span:nth-child(odd) {
    font-weight: 600;
    color: #00a0a0;
}

#gvvInfoGrid span:nth-child(even) {
    color: #ffffff;
    font-family: 'Courier New', monospace;
}

/* Preview section improvements */
#gvvPreviewSection {
    margin-top: 30px;
}

#gvvOriginalHeader, #gvvUpdatedHeader {
    max-height: 150px;
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 128, 128, 0.2);
}

/* Instructions styling */
.filter-section h4 {
    color: #00a0a0;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-shadow: 0 0 5px rgba(0, 160, 160, 0.3);
}

.filter-section ol {
    color: #cccccc;
    margin-left: 20px;
}

.filter-section li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Warning text styling */
.warning-text {
    color: #ff4444;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
    background: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .content {
        padding: 20px;
    }
    
    .upload-section {
        padding: 30px 20px;
    }
    
    .grid-view {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tab {
        flex: 1;
        min-width: 120px;
    }
}

/* Additional hover effects and animations */
.upload-section, .attachment-card, .stat-card, .tab, .download-btn {
    position: relative;
    overflow: hidden;
}

.upload-section::before, .attachment-card::before, .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.upload-section:hover::before, .attachment-card:hover::before, .stat-card:hover::before {
    left: 100%;
}
