/* Premium Navy-Gold Data Converter Styles */

/* Base Styles */
:root {
    --navy-dark: #0a1e3c;
    --navy-medium: #1a2a44;
    --navy-light: #2c3e50;
    --gold-dark: #b08c1a;
    --gold-medium: #d4af37;
    --gold-light: #f1c40f;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #888888;
    --text-dark: #333333;
    --text-light: #f8f8f8;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-dark: 0 8px 30px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
}

/* Tool Header */
.tool-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-medium));
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('../../assets/images/pattern.png');
    opacity: 0.05;
}

.premium-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--navy-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    font-weight: bold;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    z-index: 1;
}

.premium-badge i {
    margin-right: 0.25rem;
}

.tool-title {
    position: relative;
    z-index: 1;
    text-align: center;
}

.tool-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-title h1 i {
    color: var(--gold-medium);
}

.title-underline {
    height: 4px;
    width: 80px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    margin: 0.75rem auto 1.5rem;
    border-radius: 2px;
}

.tool-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Tool Content */
.tool-content {
    padding: 3rem 0;
    background-color: var(--light-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Converter Container */
.converter-container {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    padding: 2rem;
    margin-bottom: 3rem;
}

/* Format Selection */
.format-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.format-group {
    flex: 1;
}

.format-group h3 {
    color: var(--navy-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.format-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.format-btn {
    padding: 0.6rem 1rem;
    background-color: var(--light-gray);
    color: var(--navy-dark);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.format-btn:hover {
    background-color: var(--medium-gray);
}

.format-btn.active {
    background-color: var(--navy-light);
    color: var(--white);
    border-color: var(--navy-light);
}

.format-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--light-gray);
    border-radius: 50%;
    margin: 0 1.5rem;
}

.format-divider i {
    font-size: 1.5rem;
    color: var(--gold-medium);
}

/* Editor Controls */
.editor-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 1;
    min-width: 250px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--navy-light);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background-color: var(--navy-medium);
    transform: translateY(-2px);
}

.control-btn i {
    color: var(--gold-light);
    font-size: 0.9rem;
}

.control-btn.primary {
    background-color: var(--gold-dark);
    color: var(--white);
}

.control-btn.primary:hover {
    background-color: var(--gold-medium);
}

.control-btn.primary i {
    color: var(--white);
}

/* Editors Container */
.editors-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.editor-wrapper {
    display: flex;
    flex-direction: column;
}

.editor-wrapper h3 {
    color: var(--navy-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-wrapper h3 span {
    color: var(--gold-dark);
    font-size: 0.9rem;
    font-weight: normal;
    background-color: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius-sm);
}

.code-editor {
    height: 400px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

/* Options Panel */
.options-panel {
    background-color: var(--light-gray);
    border-radius: var(--border-radius-md);
    margin-top: 1.5rem;
    overflow: hidden;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--navy-light);
    color: var(--white);
}

.options-header h3 {
    margin: 0;
    font-size: 1rem;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--gold-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-btn:hover {
    color: var(--gold-medium);
    transform: rotate(90deg);
}

.options-content {
    padding: 1.5rem;
    display: none;
}

.options-content.show {
    display: block;
}

.option-group {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.option-group.show {
    display: grid;
}

.option-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-item label {
    color: var(--navy-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.option-item select,
.option-item input[type="text"] {
    padding: 0.6rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    background-color: var(--white);
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold-medium);
}

/* Features Section */
.features-section {
    margin-bottom: 3rem;
}

.features-section h2 {
    text-align: center;
    color: var(--navy-dark);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.features-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--gold-medium);
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: var(--navy-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-item p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* How To Use Section */
.how-to-section {
    margin-bottom: 3rem;
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-medium);
}

.how-to-section h2 {
    text-align: center;
    color: var(--navy-dark);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.how-to-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy-medium), var(--navy-dark));
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--navy-dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    text-align: center;
    color: var(--navy-dark);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.faq-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background-color: var(--light-gray);
}

.faq-question h3 {
    color: var(--navy-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: var(--gold-medium);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    display: none;
}

.faq-answer p {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

.faq-item.active .faq-question {
    background-color: var(--light-gray);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    display: block;
}

/* CodeMirror Customization */
.CodeMirror {
    height: 100%;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.cm-s-dracula .CodeMirror-gutters {
    background-color: var(--navy-dark);
    border-right: 1px solid var(--navy-medium);
}

.cm-s-dracula .CodeMirror-linenumber {
    color: var(--gold-dark);
}

.cm-s-dracula .CodeMirror-cursor {
    border-left: 2px solid var(--gold-medium);
}

.cm-s-dracula .CodeMirror-activeline-background {
    background: rgba(10, 30, 60, 0.3);
}

.cm-s-dracula .CodeMirror-selected {
    background: rgba(212, 175, 55, 0.2);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.success {
    background-color: #28a745;
}

.toast-notification.error {
    background-color: #dc3545;
}

.toast-notification.warning {
    background-color: #ffc107;
    color: #212529;
}

.toast-notification.info {
    background-color: #17a2b8;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .format-selection {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .format-divider {
        transform: rotate(90deg);
    }
    
    .editor-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .tool-title h1 {
        font-size: 2rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .converter-container {
        padding: 1.5rem;
    }
    
    .editors-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .code-editor {
        height: 300px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .tool-header {
        padding: 2rem 0;
    }
    
    .tool-title h1 {
        font-size: 1.8rem;
    }
    
    .format-options {
        flex-direction: column;
        align-items: center;
    }
    
    .format-btn {
        width: 100%;
        text-align: center;
    }
    
    .control-btn {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    
    .code-editor {
        height: 250px;
    }
    
    .how-to-section, .converter-container {
        padding: 1.25rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-item, .step, .faq-item {
    animation: fadeIn 0.5s ease-out forwards;
}

.feature-item:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(4) {
    animation-delay: 0.3s;
}

.feature-item:nth-child(5) {
    animation-delay: 0.4s;
}

.feature-item:nth-child(6) {
    animation-delay: 0.5s;
}

.step:nth-child(2) {
    animation-delay: 0.1s;
}

.step:nth-child(3) {
    animation-delay: 0.2s;
}

.step:nth-child(4) {
    animation-delay: 0.3s;
}

.faq-item:nth-child(2) {
    animation-delay: 0.1s;
}

.faq-item:nth-child(3) {
    animation-delay: 0.2s;
}

.faq-item:nth-child(4) {
    animation-delay: 0.3s;
}
