/**
 * MamunTools - Common Tool Styles
 * Shared CSS for all tools: editors, buttons, line numbers, etc.
 * NOTE: Global utility classes (alerts, etc.) are in style.css
 */

/* ===== TOOLS CATEGORY SECTION STYLES ===== */
.tools-category-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tools-category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0;
}

.tools-category-title i {
    font-size: 1.75rem;
    color: #667eea;
}

.tools-category-description {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0;
}

/* ===== TOOLS GRID ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.tool-card-wrapper {
    height: 100%;
}

.tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.tool-card:hover {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
}

.tool-card-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.tool-card:hover .tool-card-icon {
    background: #e8e8ff;
}

.tool-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.tool-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.tool-card-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-free {
    background: #e8f5e9;
    color: #2e7d32;
}

.tool-card-users {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-card-users-icon {
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.empty-state p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* ===== TOOL SECTION SHARED STYLES ===== */
.tool-section {
    background: #ffffff;
    padding: 3rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

.tool-section .container-fluid {
    margin: 0 auto;
    padding: 0;
}

/* ===== RESPONSIVE GRID ===== */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }

    .tools-category-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .tools-category-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .tools-category-title {
        font-size: 1.35rem;
        gap: 0.5rem;
    }

    .tools-category-title i {
        font-size: 1.35rem;
    }

    .tools-category-description {
        font-size: 0.9rem;
    }

    .tool-card {
        padding: 1rem 0.85rem;
    }

    .tool-card-icon {
        width: 50px;
        height: 50px;
    }

    .tool-emoji {
        font-size: 1.5rem;
    }

    .tool-card-title {
        font-size: 0.9rem;
    }

    .tool-section {
        padding: 2rem 1rem;
    }
}

@media (max-width: 576px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .tools-category-title {
        font-size: 1.2rem;
    }

    .tools-category-title i {
        font-size: 1.2rem;
    }

    .tools-category-description {
        font-size: 0.85rem;
    }

    .tool-card {
        padding: 0.85rem 0.75rem;
    }

    .tool-card-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.5rem;
    }

    .tool-emoji {
        font-size: 1.3rem;
    }

    .tool-card-title {
        font-size: 0.85rem;
    }

    .tool-section {
        padding: 1.5rem 1rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }
}

/* ===== JSON SYNTAX HIGHLIGHTING ===== */
.json-key {
    color: #9cdcfe;
    font-weight: 600;
}

.json-string {
    color: #ce9178;
}

.json-number {
    color: #b5cea8;
}

.json-boolean {
    color: #569cd6;
}

.json-null {
    color: #569cd6;
}

.json-operator {
    color: #d4d4d4;
}

/* ===== YAML SYNTAX HIGHLIGHTING ===== */
.yaml-key {
    color: #9cdcfe;
    font-weight: 600;
}

.yaml-value {
    color: #ce9178;
}

.yaml-string {
    color: #ce9178;
}

.yaml-number {
    color: #b5cea8;
}

.yaml-boolean {
    color: #569cd6;
}

.yaml-operator {
    color: #d4d4d4;
}

.yaml-comment {
    color: #6a9955;
    font-style: italic;
}

/* ===== XML SYNTAX HIGHLIGHTING ===== */
.xml-tag {
    color: #569cd6;
    font-weight: 500;
}

.xml-tagname {
    color: #d7ba7d;
    font-weight: 600;
}

.xml-attrname {
    color: #9cdcfe;
    font-weight: 500;
}

.xml-attrvalue {
    color: #ce9178;
}

.xml-text {
    color: #d4d4d4;
}

.xml-comment {
    color: #6a9955;
    font-style: italic;
}

.xml-declaration {
    color: #569cd6;
    font-weight: 500;
}

.xml-cdata {
    color: #ce9178;
}

/* ===== EDITOR CONTAINER STYLES ===== */
.editor-container {
    background: var(--json-editor-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #3e3e42;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.editor-header {
    background: var(--json-primary-bg);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.editor-title {
    font-weight: 700;
    color: var(--json-text-color);
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-wrapper {
    position: relative;
    display: flex;
    background: var(--json-editor-bg);
    min-height: 400px;
    max-height: 600px;
    flex: 1;
    overflow: hidden;
    align-items: stretch;
}

/* ===== LINE NUMBERS ===== */
.line-numbers {
    background: var(--json-line-number-bg);
    color: var(--json-line-number-color);
    margin: 0;
    padding: 1rem 0.5rem;
    text-align: right;
    user-select: none;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    border-right: 1px solid #3e3e42;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    display: block;
    height: 100%;
    box-sizing: border-box;
    word-break: break-all;
    word-wrap: break-word;
}

.line-numbers::-webkit-scrollbar {
    width: 0;
}

/* ===== CODE EDITOR ===== */
.code-editor {
    flex: 1;
    background: var(--json-editor-bg);
    color: var(--json-text-color);
    border: none;
    padding: 1rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    caret-color: #007acc;
    overflow-y: scroll;
    overflow-x: auto;
    box-sizing: border-box;
}

.code-editor::selection {
    background: #264f78;
}

.code-editor:focus {
    box-shadow: inset 0 0 0 1px #007acc;
}

.code-editor::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.code-editor::-webkit-scrollbar-track {
    background: var(--json-editor-bg);
}

.code-editor::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

.code-editor::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Styled pre element for syntax highlighting */
#jsonOutputHighlighted {
    flex: 1;
    background: var(--json-editor-bg);
    color: var(--json-text-color);
    border: none;
    padding: 1rem;
    padding-bottom: 2rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    overflow-y: scroll;
    overflow-x: auto;
    box-sizing: border-box;
    user-select: text;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
}

#jsonOutputHighlighted::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#jsonOutputHighlighted::-webkit-scrollbar-track {
    background: var(--json-editor-bg);
}

#jsonOutputHighlighted::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

#jsonOutputHighlighted::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* XML Output Highlighting */
#xmlOutputHighlighted {
    flex: 1;
    background: var(--json-editor-bg);
    color: var(--json-text-color);
    border: none;
    padding: 1rem;
    padding-bottom: 2rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    overflow-y: scroll;
    overflow-x: auto;
    box-sizing: border-box;
    user-select: text;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

#xmlOutputHighlighted::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#xmlOutputHighlighted::-webkit-scrollbar-track {
    background: var(--json-editor-bg);
}

#xmlOutputHighlighted::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

#xmlOutputHighlighted::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* YAML Output Highlighting */
#yamlOutputHighlighted {
    flex: 1;
    background: var(--json-editor-bg);
    color: var(--json-text-color);
    border: none;
    padding: 1rem;
    padding-bottom: 2rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    overflow-y: scroll;
    overflow-x: auto;
    box-sizing: border-box;
    user-select: text;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

#yamlOutputHighlighted::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#yamlOutputHighlighted::-webkit-scrollbar-track {
    background: var(--json-editor-bg);
}

#yamlOutputHighlighted::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

#yamlOutputHighlighted::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* YAML Output Highlighted - Professional Dark Theme */
.yaml-output-highlighted {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    padding: 1rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    overflow-y: auto;
    overflow-x: auto;
    box-sizing: border-box;
    user-select: text;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    tab-size: 4;
    -moz-tab-size: 4;
}

.yaml-output-highlighted::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.yaml-output-highlighted::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.yaml-output-highlighted::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

.yaml-output-highlighted::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* ===== BUTTON STYLES ===== */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--json-line-number-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: #3e3e42;
    color: var(--json-text-color);
}

.btn-validate,
.btn-format {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem !important;
    width: 100%;
}

.btn-validate:hover,
.btn-format:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-validate:active,
.btn-format:active {
    transform: translateY(0);
}

/* ===== ERROR DETAILS ===== */
.error-details {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: word-break;
    color: #FF8A8A;
}

.empty-state-output {
    text-align: center;
    color: var(--json-line-number-color);
    width: 100%;
    padding: 3rem 1rem;
}

.empty-state-output i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state-output p {
    margin: 0;
    font-size: 0.95rem;
}

/* ===== VALIDATION OUTPUT ===== */
.validation-output {
    min-height: 400px;
    padding: 2rem;
    background: var(--json-editor-bg);
    border-radius: 0;
    border: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
    flex: 1;
}

.validation-output::-webkit-scrollbar {
    width: 10px;
}

.validation-output::-webkit-scrollbar-track {
    background: var(--json-editor-bg);
}

.validation-output::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 5px;
}

.validation-output::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* ===== JSON VALIDATOR SPECIFIC STYLES ===== */
.json-validator-section {
    padding: 2rem;
}

/* Action Buttons */
.json-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 2rem;
}

.json-action-buttons .btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    color: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
    text-decoration: none !important;
}

.json-action-buttons .btn-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.json-action-buttons .btn-action:active {
    transform: translateY(0) !important;
    color: white !important;
}

.json-action-buttons .btn-action:focus {
    outline: none !important;
    color: white !important;
}

/* XML Action Buttons - Same styling as JSON */
.xml-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 2rem;
}

.xml-action-buttons .btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    color: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
    text-decoration: none !important;
}

.xml-action-buttons .btn-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.xml-action-buttons .btn-action:active {
    transform: translateY(0) !important;
    color: white !important;
}

.xml-action-buttons .btn-action:focus {
    outline: none !important;
    color: white !important;
}

/* YAML Action Buttons - Same styling as JSON and XML */
.yaml-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 2rem;
}

.yaml-action-buttons .btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    color: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
    text-decoration: none !important;
}

.yaml-action-buttons .btn-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.yaml-action-buttons .btn-action:active {
    transform: translateY(0) !important;
    color: white !important;
}

.yaml-action-buttons .btn-action:focus {
    outline: none !important;
    color: white !important;
}

/* ===== EPOCH CONVERTER STYLES ===== */
.epoch-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.epoch-input-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.epoch-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.epoch-input-group label {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    margin: 0;
}

.epoch-input-group input {
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

.epoch-input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

.epoch-input-group input::placeholder {
    color: #999;
}

.epoch-button {
    padding: 0.875rem 1.5rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.epoch-button:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.epoch-button:active {
    transform: translateY(0);
}

.epoch-button i {
    font-size: 0.9rem;
}

.epoch-results {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f5e9 100%);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid #e0e8f0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.epoch-results-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0052a3;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.3px;
}

.epoch-results-title i {
    font-size: 1.3rem;
    color: #2e7d32;
}

.epoch-result-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    align-items: start;
}

.epoch-result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.epoch-result-label {
    font-weight: 600;
    color: #1b5e20;
    font-size: 0.9rem;
    padding-top: 0.25rem;
}

.epoch-result-value {
    font-family: 'Courier New', 'Courier', monospace;
    color: #c2185b;
    word-break: break-all;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border-left: 3px solid #c2185b;
}

.epoch-empty-state {
    color: #666;
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.epoch-empty-state i {
    display: block;
    font-size: 2.2rem;
    color: #ddd;
    margin-bottom: 0.75rem;
}

/* ===== EPOCH CONVERTER RESPONSIVE ===== */
@media (max-width: 1024px) {
    .epoch-results {
        position: static;
        top: auto;
    }
    
    .epoch-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .epoch-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .epoch-input-section {
        gap: 1.5rem;
    }

    .epoch-input-group label {
        font-size: 0.95rem;
    }

    .epoch-input-group input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .epoch-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .epoch-result-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    .epoch-result-label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .epoch-result-value {
        font-size: 0.85rem;
        padding: 0.5rem 0.875rem;
    }

    .epoch-results {
        padding: 1.5rem;
    }

    .epoch-results-title {
        font-size: 1rem;
    }
}

/* ===== REGEX TESTER STYLES ===== */
.regex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.regex-input-panel,
.regex-results-panel {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.regex-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.regex-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.3px;
}

.regex-panel-actions {
    display: flex;
    gap: 0.5rem;
}

.regex-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.regex-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.regex-action-btn:active {
    transform: translateY(0);
}

.regex-input-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.regex-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.regex-form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    margin: 0;
}

.regex-form-control {
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

.regex-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.regex-form-control::placeholder {
    color: #999;
}

.regex-textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    min-height: 150px;
}

.regex-flags-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.regex-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.regex-checkbox label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    margin: 0;
    user-select: none;
}

.regex-button {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.regex-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.regex-button:active {
    transform: translateY(0);
}

.regex-button i {
    font-size: 0.9rem;
}

.regex-output-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

.regex-output-content::-webkit-scrollbar {
    width: 8px;
}

.regex-output-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.regex-output-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.regex-output-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.regex-empty-state {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
}

.regex-empty-state i {
    display: block;
    font-size: 2rem;
    color: #ddd;
    margin-bottom: 0.75rem;
}

.regex-empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

.regex-result-item {
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.regex-result-item:last-child {
    margin-bottom: 0;
}

.regex-result-label {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.regex-result-value {
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== REGEX TESTER RESPONSIVE ===== */
@media (max-width: 1024px) {
    .regex-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .regex-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .regex-panel-header {
        padding: 1rem 1.25rem;
    }

    .regex-panel-title {
        font-size: 1rem;
    }

    .regex-input-content {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .regex-output-content {
        padding: 1.25rem;
        max-height: 400px;
    }

    .regex-form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .regex-textarea {
        min-height: 120px;
    }

    .regex-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ===== REGEX LANGUAGE SELECTOR ===== */
.regex-language-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.regex-language-select:hover {
    border-color: #667eea;
    background-color: #f9f9f9;
}

.regex-language-note {
    display: block;
    margin-top: 0.5rem;
    color: #667eea;
    font-size: 0.85rem;
    font-style: italic;
    min-height: 1.2rem;
}

/* ===== QR CODE GENERATOR STYLES ===== */
.qr-panel {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qr-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.qr-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.3px;
}

.qr-panel-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.qr-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qr-form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    margin: 0;
}

.qr-helper-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.qr-textarea {
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.qr-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #fafbfc;
}

.qr-textarea::placeholder {
    color: #999;
    font-style: normal;
}

.qr-textarea::-webkit-scrollbar {
    width: 8px;
}

.qr-textarea::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.qr-textarea::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.qr-textarea::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.preset-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
}

.preset-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.preset-btn:active {
    transform: scale(0.95);
}

.capacity-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    margin-top: 0.5rem;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(to right, #28a745, #ffc107, #dc3545);
    transition: width 0.2s ease;
}

.qr-output-area {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background: #f8f9fa;
}

.qr-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.qr-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.qr-action-btn:active {
    transform: translateY(0);
}

/* ===== QR CODE GENERATOR RESPONSIVE ===== */
@media (max-width: 768px) {
    .qr-panel-header {
        padding: 1rem 1.25rem;
    }

    .qr-panel-header h3 {
        font-size: 1rem;
    }

    .qr-panel-content {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .qr-output-area {
        padding: 1.5rem;
        min-height: 400px;
    }
}

/* ===== DATETIME PICKER STYLES ===== */
input[type="datetime-local"] {
    position: relative;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    border-radius: 4px;
    margin-right: 4px;
    opacity: 0.6;
    filter: invert(0.8);
    transition: all 0.3s ease;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    padding-right: 2.5rem;
}

/* Firefox datetime picker */
input[type="datetime-local"]::placeholder {
    color: #999;
}

/* ===== FORM RANGE SLIDER STYLES ===== */
.form-range {
    display: block;
    width: 100%;
    height: 6px;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* WebKit browsers (Chrome, Safari, Edge) */
.form-range::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    margin-top: -7px;
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.form-range::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

/* Firefox */
.form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    margin: 0;
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.form-range::-moz-range-thumb:active {
    transform: scale(0.95);
}

.form-range:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tool-section {
        padding: 1.5rem 1rem;
    }

    .editor-header {
        padding: 0.75rem 1rem;
    }

    .editor-wrapper {
        min-height: 300px;
        max-height: 400px;
    }

    .line-numbers {
        min-width: 40px;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .code-editor {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .tool-section {
        padding: 1rem;
    }

    .editor-container {
        border-radius: 8px;
        min-height: 400px;
    }

    .editor-header {
        padding: 0.65rem 0.9rem;
        gap: 0.5rem;
    }

    .editor-title {
        font-size: 0.9rem;
    }

    .btn-icon {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .editor-wrapper {
        min-height: 250px;
        max-height: 350px;
    }

    .line-numbers {
        min-width: 35px;
        padding: 0.65rem 0.4rem;
        font-size: 0.75rem;
    }

    .code-editor {
        font-size: 0.75rem;
        padding: 0.65rem;
    }

    .btn-validate,
    .btn-format {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
