/* HTML, CSS & JS Minifier & Beautifier — golden luxury */
.tool-page-shell .minifier-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.minifier-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.input-section, .output-section {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
    border: 1px solid rgba(145, 103, 48, 0.2);
    display: flex;
    flex-direction: column;
}

.input-header, .output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(145, 103, 48, 0.2);
}

.input-header h3, .output-header h3 {
    color: #5e4329;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Format Selector Radio Buttons */
.format-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(88, 64, 38, 0.85);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(145, 103, 48, 0.4);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 6px;
    height: 6px;
    background: #ab7c34;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #ab7c34;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label:hover {
    color: #7a5526;
}

/* Textarea Container */
.textarea-container {
    margin-bottom: 20px;
    position: relative;
}

#inputCode, #outputCode {
    width: 100%;
    min-height: 250px;
    padding: 16px;
    background: #fffaf2;
    border: 2px solid rgba(145, 103, 48, 0.22);
    border-radius: 8px;
    color: #4a351f;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#inputCode:focus {
    outline: none;
    border-color: #ab7c34;
    box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.12);
    transform: translateY(-1px);
}

#outputCode {
    background: #f5ebe0;
    border-color: rgba(145, 103, 48, 0.28);
    cursor: default;
}

#outputCode:focus {
    outline: none;
    border-color: #ab7c34;
    box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.12);
    transform: translateY(-1px);
}

.character-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: #8c7558;
    background: rgba(255, 250, 242, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.character-counter.warning {
    color: #c17a1a;
}

.character-counter.error {
    color: #c94a3a;
}

/* Options Section */
.options-section {
    margin-bottom: 25px;
}

.option-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.option-group label {
    color: #5e4329;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 90px;
}

.option-group select {
    padding: 8px 12px;
    background: #fffaf2;
    border: 2px solid rgba(145, 103, 48, 0.22);
    border-radius: 6px;
    color: #4a351f;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.option-group select:focus {
    outline: none;
    border-color: #ab7c34;
    box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.12);
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(88, 64, 38, 0.85);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(145, 103, 48, 0.4);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 1px;
    color: #ab7c34;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #ab7c34;
    background: rgba(171, 124, 52, 0.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
}

.checkbox-label:hover {
    color: #7a5526;
}

/* Button Container matching index.html style */
.btn-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn i{
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
    color: #fff8ef;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(145, 103, 48, 0.4);
    color: #7a572c;
}

.btn-secondary:hover {
    background: rgba(182, 138, 58, 0.12);
    color: #5e4329;
    transform: scale(1.05);
}

/* Output Actions */
.output-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: transparent;
    border: 1px solid rgba(145, 103, 48, 0.35);
    color: #7a572c;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.action-btn:hover {
    background: rgba(182, 138, 58, 0.1);
    border-color: #ab7c34;
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.action-btn.copied {
    animation: copyPulse 0.6s ease;
    box-shadow: 0 0 15px rgba(171, 124, 52, 0.45);
}

.action-btn.copied svg {
    display: inline-block;
    vertical-align: middle;
}

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

/* Output Display */
.output-display {
    flex-grow: 1;
    position: relative;
}

/* Combined output area */
#outputCode {
    position: relative;
}

#outputCode.empty {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238c7558" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="m5 12-3 3 3 3"/><path d="m9 18 3-3-3-3"/></svg>');
    background-repeat: no-repeat;
    background-position: center 35%;
    background-size: 50px;
    border: 2px dashed rgba(145, 103, 48, 0.25);
    background-color: rgba(182, 138, 58, 0.06);
}

#outputCode.empty::before {
    content: 'No code processed yet';
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    color: #8c7558;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

#outputCode.empty::after {
    content: 'Enter code and click minify or beautify to see results';
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    color: #8c7558;
    font-size: 0.9rem;
    opacity: 0.85;
    font-family: 'Outfit', sans-serif;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
    max-width: 90%;
}

#outputCode.empty:focus::before,
#outputCode.empty:focus::after {
    opacity: 0.3;
}

.no-output-message {
    display: none;
}

.error-message {
    color: #c94a3a;
    background: rgba(201, 74, 58, 0.08);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(201, 74, 58, 0.28);
    text-align: center;
    font-weight: 500;
    display: none;
    margin-top: 15px;
}

.error-message.show {
    display: block;
}

/* Stats Message */
.stats-message {
    color: #7a5526;
    background: rgba(182, 138, 58, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(145, 103, 48, 0.28);
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    display: none;
    margin-top: 10px;
}

.stats-message.show {
    display: block;
}

/* Disclaimer Section - Orange Theme */


/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #b98b3b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
}

.toast.error {
  background: #c94a3a;
  color: #fff;
}

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

/* Desktop button layout - keep original structure */
.btn-primary-row {
    display: contents; /* Make it transparent on desktop */
}

.btn-secondary-row {
    display: contents; /* Make it transparent on desktop */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .minifier-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .minifier-container {
        padding: 15px 0;
    }
    
    .input-section,
    .output-section {
        padding: 20px;
    }
    
    .input-header, .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .format-selector {
        width: 100%;
        justify-content: flex-start;
    }
    
    .output-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .btn-container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Mobile-specific button row styling */
    .btn-primary-row {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .btn-primary-row .btn {
        flex: 1;
        justify-content: center;
    }
    
    .btn-secondary-row {
        display: block;
        width: 100%;
    }
    
    .btn-secondary-row .btn {
        width: 100%;
        justify-content: center;
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .option-group label {
        min-width: auto;
    }
    
    .option-group select {
        width: 100%;
        min-width: auto;
    }
    
    #inputCode, #outputCode {
        min-height: 220px;
        font-size: 0.85rem;
    }
    
    
    .toast {
        top: auto;
        bottom: 100px;
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .minifier-container {
        padding: 10px 0;
    }
    
    .input-section,
    .output-section {
        padding: 15px;
    }
    
    #inputCode, #outputCode {
        min-height: 180px;
        font-size: 0.8rem;
        padding: 12px;
    }
    
    .character-counter {
        font-size: 0.7rem;
    }
    
    #outputCode.empty::before {
        font-size: 0.95rem;
        top: 52%;
        white-space: nowrap;
    }
    
    #outputCode.empty::after {
        font-size: 0.75rem;
        top: 62%;
        white-space: normal;
        max-width: 85%;
        line-height: 1.3;
    }
    
    .format-selector {
        gap: 10px;
    }
    
    .radio-label {
        font-size: 0.8rem;
    }
}
