/* DLL Patcher Premium Styles */

:root {
    --patcher-bg-glass: rgba(30, 34, 41, 0.6);
    --patcher-border: rgba(255, 255, 255, 0.1);
    --patcher-accent: var(--md-primary-fg-color);
    --patcher-accent-hover: var(--md-primary-fg-color--light);
    --patcher-text-muted: rgba(255, 255, 255, 0.6);
    --patcher-card-bg: rgba(255, 255, 255, 0.03);
    --patcher-card-hover: rgba(255, 255, 255, 0.06);
    --patcher-radius: 12px;
    --patcher-space: 1.5rem;
}

.dllpatcher-host {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Main Container */
.dllpatcher-host .patchContainer {
    width: 100%;
    max-width: 1200px;
    background: var(--patcher-bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--patcher-border);
    border-radius: var(--patcher-radius);
    padding: var(--patcher-space);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: var(--patcher-space);
}

/* Header / Hero Section */
.patch-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-bottom: var(--patcher-space);
    border-bottom: 1px solid var(--patcher-border);
}

.patch-hero h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* File Input Zone */
.file-drop-zone {
    width: 100%;
    max-width: 600px;
    border: 2px dashed var(--patcher-border);
    border-radius: var(--patcher-radius);
    padding: 2rem;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--patcher-accent);
    background: rgba(var(--md-primary-fg-color--rgb), 0.1);
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-drop-zone-label {
    pointer-events: none;
    font-size: 1.1rem;
}

.file-drop-zone-label strong {
    color: var(--patcher-accent);
}

/* Status Messages */
.status-area {
    width: 100%;
    text-align: center;
    min-height: 1.5em;
    /* Prevent layout jump */
}

.success-message {
    color: #4ade80;
    /* Green */
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.error-message {
    color: #f87171;
    /* Red */
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.hidden {
    display: none;
}

/* Grid Layout for Patches */
.patch-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column */
    gap: 1rem;
}

/* Patch Cards */
.patch-card {
    background: var(--patcher-card-bg);
    border: 1px solid var(--patcher-border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.patch-card:hover {
    background: var(--patcher-card-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.patch-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--patcher-border);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-checkbox:checked {
    background: var(--patcher-accent);
    border-color: var(--patcher-accent);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.9rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.patch-label {
    font-weight: 600;
    flex-grow: 1;
    cursor: pointer;
    line-height: 1.4;
}

/* Union / Radio Groups */
.patch-union-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.patch-union-title {
    font-weight: 600;
    color: var(--md-typeset-color);
    margin-bottom: 0.25rem;
    display: block;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.custom-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--patcher-border);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
}

.custom-radio:checked {
    border-color: var(--patcher-accent);
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    background: var(--patcher-accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Number / Hex Inputs */
.input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.modern-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--patcher-border);
    color: var(--md-text-color);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s;
}

.modern-input:focus {
    outline: none;
    border-color: var(--patcher-accent);
}

/* Tooltips */
.patch-description {
    font-size: 0.85rem;
    color: var(--patcher-text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
    padding-left: 2rem;
    /* Align matches checkbox intent */
}

.union-description {
    font-size: 0.85rem;
    color: var(--patcher-text-muted);
    margin-left: 1.6rem;
}

.danger-tag {
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    border: 1px solid rgba(248, 113, 113, 0.3);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--patcher-border);
}

.primary-btn {
    background: var(--patcher-accent);
    color: var(--md-primary-bg-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover {
    background: var(--patcher-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #64748b;
}