/* ============================================
   DESTOLOLABS - REGEX BUILDER TOOL
   Professional Design System
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F7F6F3;
    color: #222222;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, .logo, .footer-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ===== HEADER ===== */
.header {
    background: #FFFFFF;
    border-bottom: 1px solid #E7E4DF;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: max(20px, 5%);
    padding-right: max(20px, 5%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    color: #071F32;
    text-decoration: none;
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
}

.logo span {
    color: #D6B18A;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav a {
    text-decoration: none;
    color: #222222;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
    color: #D6B18A;
}

.auth {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn-signin {
    background: white;
    border: 1px solid #071F32;
    color: #071F32;
}

.btn-signin:hover {
    background: #F7F6F3;
    border-color: #D6B18A;
    color: #041826;
}

.btn-signup {
    background: #071F32;
    color: white;
    border: none;
}

.btn-signup:hover {
    background: #041826;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(7, 31, 50, 0.12);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #071F32;
    padding: 8px;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px max(20px, 5%);
    overflow-x: hidden;
}

/* ===== 3-COLUMN LAYOUT ===== */
.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* ===== SIDEBARS ===== */
.sidebar-card {
    background: #FFFFFF;
    border: 1px solid #E7E4DF;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
    overflow: hidden;
}

.sidebar-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #071F32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3 i {
    color: #D6B18A;
}

.category-group {
    margin-bottom: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-weight: 600;
    color: #071F32;
    cursor: pointer;
    font-size: 0.95rem;
}

.category-header span i {
    margin-right: 10px;
    color: #D6B18A;
    width: 20px;
}

.chevron {
    transition: transform 0.2s;
    color: #A8A49C;
    font-size: 0.8rem;
}

.chevron.rotated {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding-left: 30px;
}

.category-content.open {
    display: block;
}

.category-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.category-content a i {
    width: 20px;
    font-size: 0.85rem;
}

.category-content a:hover,
.category-content a.active {
    color: #D6B18A;
}

.info-box {
    text-align: center;
    padding: 16px;
    background: #F7F6F3;
    border-radius: 16px;
    width: 100%;
}

.info-box i {
    font-size: 2.5rem;
    color: #D6B18A;
    margin-bottom: 12px;
    display: block;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #071F32;
}

.info-box p {
    font-size: 0.75rem;
    color: #6A6A6A;
    line-height: 1.4;
}

/* ===== TOOL AREA ===== */
.tool-area {
    width: 100%;
    min-width: 0;
}

.tool-card {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #E7E4DF;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.tool-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #E7E4DF;
}

.tool-badge-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F7F6F3;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #D6B18A;
    letter-spacing: 0.5px;
}

.tool-badge-free {
    background: #E8F5E9;
    color: #2E7D32;
}

.tool-badge-free i {
    color: #2E7D32;
}

.tool-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: #071F32;
}

.tool-description {
    color: #6A6A6A;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tool-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E7E4DF;
}

.tool-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6A6A6A;
    font-weight: 500;
}

.tool-stats span i {
    color: #D6B18A;
}

/* ===== INPUT CARD ===== */
.input-card {
    padding: 32px;
}

/* ===== REGEX INPUT ===== */
.regex-input-section {
    margin-bottom: 24px;
}

.regex-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.regex-input-header label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
}

.regex-input-header label i {
    color: #D6B18A;
    margin-right: 8px;
}

.regex-flags {
    display: flex;
    gap: 4px;
}

.flag-btn {
    padding: 4px 10px;
    border: 1px solid #E7E4DF;
    background: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    color: #6A6A6A;
}

.flag-btn:hover {
    border-color: #D6B18A;
    color: #D6B18A;
}

.flag-btn.active {
    background: #071F32;
    border-color: #071F32;
    color: white;
}

.regex-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #E7E4DF;
    border-radius: 12px;
    padding: 0 4px;
    transition: border-color 0.2s;
}

.regex-input-wrapper:focus-within {
    border-color: #D6B18A;
    box-shadow: 0 0 0 3px rgba(214, 177, 138, 0.1);
}

.regex-delimiter {
    padding: 10px 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #D6B18A;
    font-family: 'Fira Code', monospace;
}

.regex-input {
    flex: 1;
    padding: 10px 4px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Fira Code', monospace;
    background: transparent;
    color: #071F32;
    min-width: 100px;
}

.regex-flags-display {
    padding: 10px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #D6B18A;
    font-family: 'Fira Code', monospace;
}

.regex-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #A8A49C;
}

/* ===== TEST STRING ===== */
.test-string-section {
    margin-bottom: 24px;
}

.test-string-section label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
    display: block;
    margin-bottom: 8px;
}

.test-string-section label i {
    color: #D6B18A;
    margin-right: 8px;
}

.test-string-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E7E4DF;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #222222;
    background: white;
    resize: vertical;
    transition: border-color 0.2s;
    min-height: 120px;
    line-height: 1.6;
}

.test-string-input:focus {
    outline: none;
    border-color: #D6B18A;
    box-shadow: 0 0 0 3px rgba(214, 177, 138, 0.1);
}

/* ===== RESULTS ===== */
.results-section {
    margin-bottom: 24px;
    border: 1px solid #E7E4DF;
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #F7F6F3;
    border-bottom: 1px solid #E7E4DF;
}

.results-header span {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
}

.results-header span i {
    color: #D6B18A;
    margin-right: 8px;
}

.results-count {
    font-weight: 600;
    font-size: 0.8rem;
    color: #2E7D32;
}

.results-container {
    padding: 16px 20px;
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
}

.no-matches {
    text-align: center;
    padding: 24px 0;
    color: #A8A49C;
}

.no-matches i {
    font-size: 2rem;
    color: #D6B18A;
    opacity: 0.5;
    display: block;
    margin-bottom: 8px;
}

.no-matches p {
    font-size: 0.85rem;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.match-item {
    padding: 8px 14px;
    background: #F0F7FF;
    border-left: 3px solid #D6B18A;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #071F32;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.2s ease;
}

.match-item .match-index {
    font-size: 0.7rem;
    color: #A8A49C;
    font-weight: 600;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== QUICK PATTERNS ===== */
.quick-patterns-section {
    margin-bottom: 24px;
}

.quick-patterns-section label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #071F32;
    display: block;
    margin-bottom: 10px;
}

.quick-patterns-section label i {
    color: #D6B18A;
    margin-right: 8px;
}

.quick-patterns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pattern-btn {
    padding: 10px 12px;
    border: 1px solid #E7E4DF;
    background: white;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6A6A6A;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pattern-btn:hover {
    border-color: #D6B18A;
    color: #D6B18A;
    background: #F7F6F3;
}

.pattern-btn:active {
    transform: scale(0.96);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn-primary {
    flex: 1;
    padding: 14px 28px;
    background: #071F32;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    min-width: 140px;
}

.action-btn-primary:hover {
    background: #041826;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 31, 50, 0.15);
}

.action-btn-secondary {
    padding: 14px 28px;
    background: white;
    border: 2px solid #E7E4DF;
    color: #6A6A6A;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    min-width: 120px;
}

.action-btn-secondary:hover {
    border-color: #D6B18A;
    color: #D6B18A;
    background: #FAFAFA;
}

/* ===== RIGHT SIDEBAR ===== */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.step-number {
    width: 28px;
    height: 28px;
    background: #F7F6F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #D6B18A;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.8rem;
    color: #6A6A6A;
    word-wrap: break-word;
}

.related-list,
.tips-list {
    list-style: none;
    width: 100%;
}

.related-list li,
.tips-list li {
    margin-bottom: 12px;
    word-wrap: break-word;
}

.related-list a {
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
    word-wrap: break-word;
}

.related-list a i {
    color: #D6B18A;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.related-list a:hover {
    color: #D6B18A;
}

.tips-list li {
    font-size: 0.8rem;
    color: #6A6A6A;
    display: flex;
    align-items: center;
    gap: 10px;
    word-wrap: break-word;
}

.tips-list li i {
    color: #D6B18A;
    width: 18px;
    flex-shrink: 0;
}

/* ===== MOBILE PRO TIPS ===== */
.mobile-pro-tips {
    display: none;
    margin-top: 24px;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid #E7E4DF;
    border-radius: 16px;
}

.mobile-pro-tips h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #071F32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-pro-tips h3 i {
    color: #D6B18A;
}

.tips-grid-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tip-item-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #6A6A6A;
    padding: 8px 12px;
    background: #F7F6F3;
    border-radius: 12px;
    word-wrap: break-word;
}

.tip-item-mobile i {
    color: #D6B18A;
    width: 20px;
    flex-shrink: 0;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin-top: 64px;
    background: transparent;
}

.faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.faq-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 500;
    margin-bottom: 12px;
    color: #071F32;
}

.faq-header p {
    color: #6A6A6A;
    font-size: 0.9rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.faq-card {
    background: white;
    border: 1px solid #E7E4DF;
    border-radius: 20px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    color: #071F32;
}

.faq-question:hover {
    background: #F7F6F3;
}

.faq-question span i {
    color: #D6B18A;
    margin-right: 12px;
}

.faq-chevron {
    transition: transform 0.25s;
    color: #D6B18A;
}

.faq-chevron.rotated {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px;
    color: #6A6A6A;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
}

.faq-answer.open {
    max-height: 300px;
    padding: 0 24px 20px;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    transition: right 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #E7E4DF;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
}

.mobile-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #071F32;
}

.mobile-logo span {
    color: #D6B18A;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #6A6A6A;
    padding: 8px;
}

.mobile-menu-divider {
    height: 1px;
    background: #E7E4DF;
    margin: 0 24px;
}

.mobile-nav-list {
    list-style: none;
    padding: 20px 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-list > li > a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #222222;
    transition: color 0.2s;
    display: block;
    padding: 8px 0;
}

.mobile-nav-list > li > a:hover {
    color: #D6B18A;
}

.mobile-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-weight: 600;
    color: #071F32;
    cursor: pointer;
    font-size: 0.95rem;
}

.mobile-category-header i:first-child {
    margin-right: 12px;
    color: #D6B18A;
    width: 24px;
}

.mobile-chevron {
    transition: transform 0.2s;
    color: #A8A49C;
    font-size: 0.8rem;
}

.mobile-chevron.rotated {
    transform: rotate(180deg);
}

.mobile-category-content {
    display: none;
    padding-left: 36px;
    margin-bottom: 8px;
}

.mobile-category-content.open {
    display: block;
}

.mobile-category-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: #6A6A6A;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.mobile-category-content a i {
    width: 20px;
    font-size: 0.8rem;
    color: #A8A49C;
}

.mobile-category-content a:hover,
.mobile-category-content a.active {
    color: #D6B18A;
}

.mobile-category-content a:hover i {
    color: #D6B18A;
}

.mobile-menu-actions {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-signin,
.mobile-getstarted {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
}

.mobile-signin {
    color: #071F32;
    border: 1px solid #071F32;
}

.mobile-getstarted {
    background: #071F32;
    color: white;
}

.mobile-menu-footer {
    padding: 20px 24px;
    text-align: center;
    margin-top: auto;
}

.mobile-menu-footer p {
    font-size: 0.75rem;
    color: #6A6A6A;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1500;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ===== FOOTER ===== */
.footer {
    background: #1A1A1A;
    color: #A8A49C;
    padding: 48px 32px 32px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    display: inline-block;
    font-family: 'Playfair Display', serif;
}

.footer-brand .logo span {
    color: #C7A85B;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #A8A49C;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    color: #A8A49C;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #C7A85B;
}

.footer-copyright {
    font-size: 0.75rem;
    color: #A8A49C;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }
    
    .tool-area {
        width: 100%;
        max-width: 100%;
    }
    
    .main-container {
        padding: 32px max(16px, 3%);
        overflow-x: hidden;
    }
    
    .input-card {
        padding: 20px 16px;
    }
    
    .quick-patterns-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mobile-pro-tips {
        display: block;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 12px;
        overflow-x: hidden;
    }
    
    .layout-grid {
        gap: 16px;
    }
    
    .tool-card {
        border-radius: 16px;
    }
    
    .tool-header {
        padding: 20px 16px;
    }
    
    .tool-header h1 {
        font-size: 1.4rem;
    }
    
    .input-card {
        padding: 16px;
    }
    
    .regex-input-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .regex-flags {
        flex-wrap: wrap;
    }
    
    .regex-input-wrapper {
        flex-wrap: wrap;
    }
    
    .quick-patterns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pattern-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn-primary,
    .action-btn-secondary {
        justify-content: center;
        width: 100%;
    }
    
    .results-container {
        max-height: 180px;
        padding: 12px 16px;
    }
    
    .match-item {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
    
    .faq-answer {
        font-size: 0.8rem;
        padding: 0 16px;
    }
    
    .faq-answer.open {
        padding: 0 16px 16px;
    }
    
    .mobile-pro-tips {
        padding: 16px;
        margin-top: 16px;
    }
    
    .tips-grid-mobile {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .tip-item-mobile {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .footer {
        padding: 32px 16px 24px;
        margin-top: 32px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 12px 8px;
    }
    
    .tool-header h1 {
        font-size: 1.2rem;
    }
    
    .tool-description {
        font-size: 0.8rem;
    }
    
    .input-card {
        padding: 12px;
    }
    
    .quick-patterns-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .pattern-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
    
    .regex-input {
        font-size: 0.85rem;
    }
    
    .test-string-input {
        font-size: 0.8rem;
        padding: 10px 12px;
        min-height: 80px;
    }
    
    .results-container {
        max-height: 150px;
        padding: 10px 12px;
    }
    
    .faq-question {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
    
    .faq-answer {
        font-size: 0.75rem;
    }
    
    .tips-grid-mobile {
        grid-template-columns: 1fr;
    }
    
    .tool-stats {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 360px) {
    .quick-patterns-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-badge {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
    
    .step-text {
        font-size: 0.7rem;
    }
    
    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
}