/* Remove default body margin */
body {
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Navbar styling */
nav {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

nav .brand-logo {
    color: #667eea !important;
    font-weight: 700;
    font-size: 1.8rem;
}

/* Main view */
#main-view {
    height: calc(100vh - 64px);
    margin-bottom: 0;
    padding: 0;
}

/* Columns */
#files-col {
    height: 100%;
    overflow-y: auto;
    background: transparent;
    padding: 20px;
}

#options-col {
    height: 100%;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar */
#files-col::-webkit-scrollbar,
#options-col::-webkit-scrollbar {
    width: 8px;
}

#files-col::-webkit-scrollbar-track,
#options-col::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#files-col::-webkit-scrollbar-thumb,
#options-col::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

#files-col::-webkit-scrollbar-thumb:hover,
#options-col::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* File placeholder */
#file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 2rem);
    text-align: center;
    padding: 3rem 2rem;
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    margin: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#file-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#file-placeholder:hover::before {
    opacity: 1;
}

#file-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#file-placeholder p {
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#select-file-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 0 3rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

#select-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

/* file name header styling */
.file-header {
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.2s ease;
}

.file-header:hover {
    transform: translateY(-4px);
}

/* Card styling */
.card {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card-title {
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem !important;
}

/* Section dividers */
.section {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.section:last-child {
    border-bottom: none;
}

.section h6 {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Data grid layout */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.data-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.2s ease;
}

.data-item:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(4px);
}

.data-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* Table styling */
table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
}

table.striped tbody tr:nth-child(odd),
table.highlight tbody tr:nth-child(odd) {
    background-color: rgba(102, 126, 234, 0.03);
}

table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08) !important;
}

table td,
table th {
    padding: 12px 16px;
    border-radius: 0;
}

table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

table thead th {
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Collection styling */
.collection {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.collection-item {
    border-bottom: 1px solid rgba(102, 126, 234, 0.1) !important;
    padding: 1rem 1.5rem !important;
    transition: all 0.2s ease;
}

.collection-item:hover {
    background-color: rgba(102, 126, 234, 0.05) !important;
    padding-left: 2rem !important;
}

.collection-item strong {
    color: #667eea;
    font-weight: 600;
}

/* Inline data layout for desktop */
@media only screen and (min-width: 993px) {
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet adjustments */
@media only screen and (max-width: 992px) {
    #files-col {
        padding: 15px;
    }
    
    .card-content {
        padding: 1.25rem !important;
    }
    
    #file-placeholder {
        padding: 2rem 1.5rem;
    }
    
    #file-placeholder p {
        font-size: 1.1rem;
    }
}

/* Mobile optimizations */
@media only screen and (max-width: 600px) {
    nav .brand-logo {
        font-size: 1.4rem;
    }
    
    #files-col {
        padding: 10px;
    }
    
    #file-placeholder {
        height: auto;
        min-height: 250px;
        padding: 2rem 1rem;
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    #file-placeholder p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    #select-file-btn {
        padding: 0 2rem;
    }
    
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem !important;
    }
    
    .card-content {
        padding: 1rem !important;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .section h6 {
        font-size: 1rem;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .data-item {
        padding: 0.6rem 0.8rem;
    }
    
    .data-label {
        font-size: 0.8rem;
    }
    
    .data-value {
        font-size: 0.95rem;
    }
    
    table td,
    table th {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Options column styling */
.options-content {
    padding: 20px;
    color: white;
}

.options-content h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.options-content h6 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.empty-state {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 2rem 1rem;
    font-style: italic;
}

.option-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Warning and success summaries */
.warning-summary {
    background: rgba(255, 152, 0, 0.2);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-summary p {
    color: #fff;
    margin: 0.5rem 0;
    font-weight: 500;
}

.success-summary {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.success-summary p {
    color: #fff;
    margin: 0;
    font-weight: 500;
}

/* Input fields in options */
.options-content .input-field label {
    color: rgba(255, 255, 255, 0.8);
}

.options-content .input-field label.active {
    color: white;
}

.options-content .input-field input {
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.options-content .input-field input:focus {
    border-bottom: 2px solid white;
    box-shadow: 0 1px 0 0 white;
}

.options-content .input-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Replacement items */
#replacements-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.replacement-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 1.2rem;
    transition: all 0.25s ease;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 1rem;
}

.replacement-item:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.replacement-item .input-field {
    margin: 0;
}

.replacement-item input {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: transparent;
    transition: all 0.2s ease;
}

.replacement-item input:focus {
    border-bottom: 2px solid #82b1ff;
    box-shadow: 0 1px 0 0 #82b1ff;
}

.replacement-item input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.replacement-item .remove-replacement {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

.replacement-item .remove-replacement:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
}

#execute-replacements #download-fnc-btn {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%) !important;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

#execute-replacements:hover #download-fnc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 160, 71, 0.5);
}

/* Buttons in options */
.options-content .btn,
.options-content .btn-small {
    width: 100%;
    margin-top: 0.5rem;
}

.options-content #execute-replacements #download-fnc-btn{
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    font-weight: 600;
    font-size: 1rem;
}

/* Warning section */
.section.warning>h6 {
    color: #ff6f00;
}

/* Warning data items */
.data-item.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffb300;
    padding-left: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.data-item.warning:hover {
    background: rgba(255, 193, 7, 0.2);
}


@keyframes pulse {
    0%, 100% {
        background: rgba(255, 152, 0, 0.15);
    }
    50% {
        background: rgba(255, 152, 0, 0.25);
    }
}

.data-item.warning .data-label {
    color: #ff6f00;
}

/* Mobile adjustments for options */
@media only screen and (max-width: 992px) {
    #options-col {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .options-content {
        padding: 15px;
    }
}
#files-col > div > h5 {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

/* Toast notifications */
.toast {
    border-radius: 50px;
    background-color: #667eea;
    font-weight: 500;
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card:nth-child(4) {
    animation-delay: 0.3s;
}

.card:nth-child(5) {
    animation-delay: 0.4s;
}
