/* Main Container Styles */
.regex-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.regex-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.regex-main-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.regex-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Tool Wrapper Styles */
.regex-tool-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .regex-tool-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Input Section Styles */
.regex-input-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.regex-input-group {
    margin-bottom: 1.5rem;
}

.regex-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

.regex-pattern-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: monospace;
}

.regex-pattern-input:focus {
    border-color: #6e8efb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.regex-input-container {
    position: relative;
}

.regex-flags {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.regex-flag-checkbox {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.regex-flag-checkbox input {
    accent-color: #6e8efb;
}

.regex-test-textarea {
    width: 100%;
    height: 200px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    font-family: monospace;
    transition: all 0.3s ease;
}

.regex-test-textarea:focus {
    border-color: #6e8efb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.regex-test-button {
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.regex-test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Results Section Styles */
.regex-results-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.regex-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.regex-results-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.regex-matches-count {
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.regex-results-output {
    height: 200px;
    overflow-y: auto;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    background: #f9f9f9;
    margin-bottom: 1.5rem;
    position: relative;
}

.regex-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    text-align: center;
}

.regex-empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    fill: #ccc;
}

.regex-match-info {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
}

.regex-info-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #444;
}

.regex-details-output {
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

/* Info Boxes Styles */
.regex-info-section {
    margin: 4rem 0;
}

.regex-section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #444;
    position: relative;
}

.regex-section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.regex-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.regex-info-box {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #6e8efb;
}

.regex-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.regex-info-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.regex-info-heading {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.regex-info-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Content Section Styles */
.regex-content-section {
    margin: 4rem 0;
}

.regex-content-block {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.regex-content-shape {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(110, 142, 251, 0.1) 0%, rgba(167, 119, 227, 0.1) 100%);
    border-radius: 50%;
    z-index: 0;
}

.regex-shape-2 {
    top: auto;
    bottom: -50px;
    left: -50px;
    background: linear-gradient(135deg, rgba(251, 110, 110, 0.1) 0%, rgba(227, 167, 119, 0.1) 100%);
}

.regex-shape-3 {
    top: 50%;
    left: -50px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(110, 251, 153, 0.1) 0%, rgba(119, 227, 219, 0.1) 100%);
}

.regex-content-heading {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    position: relative;
    z-index: 1;
}

.regex-content-text {
    color: #666;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.regex-syntax-list {
    padding-left: 1.5rem;
    position: relative;
    z-index: 1;
}

.regex-syntax-list li {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.6;
}

.regex-syntax-list code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #d6336c;
}

/* FAQ Section Styles */
.regex-faq-section {
    margin: 4rem 0;
}

.regex-faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.regex-faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.regex-faq-question {
    width: 100%;
    text-align: left;
    padding: 1.2rem 1.5rem;
    background: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.regex-faq-question:hover {
    background: #f9f9f9;
}

.regex-faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.regex-faq-question.active .regex-faq-icon {
    transform: rotate(45deg);
}

.regex-faq-answer {
    padding: 0 1.5rem;
    background: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.regex-faq-answer.show {
    padding: 1rem 1.5rem 1.5rem;
    max-height: 500px;
}

.regex-faq-answer p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.7;
}

/* Related Tools Styles */
.regex-related-tools {
    margin: 4rem 0;
}

.regex-related-container {
    display: flex;
    justify-content: center;
}

.regex-related-tool {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    max-width: 300px;
    text-align: center;
}

.regex-related-tool:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.regex-related-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.regex-related-title {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
}

.regex-related-desc {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Highlighting for matched text */
.regex-match {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
}

.regex-capture-group {
    background-color: #a5d6a7;
    padding: 0 2px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .regex-main-title {
        font-size: 2rem;
    }
    
    .regex-subtitle {
        font-size: 1rem;
    }
    
    .regex-info-boxes {
        grid-template-columns: 1fr;
    }
    
    .regex-content-block {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .regex-tool-container {
        padding: 1.5rem 1rem;
    }
    
    .regex-hero {
        padding: 1.5rem 1rem;
    }
    
    .regex-flags {
        flex-direction: column;
        gap: 0.5rem;
    }
}