:root {
    --primary-color: #4a6cf7;
    --primary-hover: #3a5be6;
    --success-color: #28c76f;
    --success-hover: #20a35a;
    --danger-color: #ea5455;
    --danger-hover: #d43b3c;
    --purple-color: #800080;
    --purple-hover: #660066;
    --text-color: #333;
    --text-light: #6e7990;
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --border-color: #e7eaef;
    --header-bg: #ffffff;
    --code-bg: #282c34;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --font-main: 'Roboto', sans-serif;
    --font-code: 'Fira Code', monospace;
}

.dark-theme {
    --text-color: #e4e6eb;
    --text-light: #b0b3b8;
    --bg-color: #18191a;
    --bg-secondary: #242526;
    --border-color: #3a3b3c;
    --header-bg: #242526;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 10px;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
}

.intro {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-light);
    padding: 0 50px;
}

h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.buttons {
    display: flex;
    gap: 10px;
}

select, button, input[type="number"] {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-secondary);
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

select {
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236e7990' viewBox='0 0 16 16'%3E%3Cpath d='M8 11l-6-6 1.41-1.41L8 8.17l4.59-4.58L14 5l-6 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn i {
    font-size: 14px;
}

.btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn.small i {
    font-size: 12px;
}

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

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

.btn.success {
    background-color: var(--success-color);
    color: white;
}

.btn.purple {
    background-color: var(--purple-color);
    color: white;
}

.btn.purple:hover {
    background-color: var(--purple-hover);
}

.btn.success:hover {
    background-color: var(--success-hover);
}

.btn.danger {
    background-color: var(--danger-color);
    color: white;
}

.btn.danger:hover {
    background-color: var(--danger-hover);
}

.code-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.code-section {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0,0,0,0.02);
    border-bottom: 1px solid var(--border-color);
}

.dark-theme .section-header {
    background-color: rgba(255,255,255,0.02);
}

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

.line-numbers-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

textarea, pre {
    flex-grow: 1;
    min-height: 350px;
    padding: 15px;
    font-family: var(--font-code);
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
    border: none;
}

textarea {
    resize: none;
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

textarea:focus {
    outline: none;
}

pre {
    background-color: var(--code-bg);
    margin: 0;
    overflow: auto;
}

code {
    font-family: var(--font-code);
}

.options-container {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0,0,0,0.02);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.dark-theme .options-header {
    background-color: rgba(255,255,255,0.02);
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="number"] {
    width: 70px;
    padding: 8px;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Styling for line numbers */
pre.with-line-numbers {
    counter-reset: line;
}

pre.with-line-numbers code {
    counter-increment: line;
    position: relative;
    padding-left: 3.5em;
    display: block;
}

pre.with-line-numbers code:before {
    content: counter(line);
    position: absolute;
    left: 0;
    width: 2.5em;
    padding-right: 0.5em;
    text-align: right;
    color: #666;
    border-right: 1px solid #555;
    margin-right: 0.5em;
    user-select: none;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 14px;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .code-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group, .buttons {
        width: 100%;
    }
    
    .buttons {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .container {
        margin: 15px;
        padding: 15px;
    }
    
    .intro {
        padding: 0;
    }
    
    .header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 600px) {
    .options {
        grid-template-columns: 1fr;
    }
    
    .buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Drag and drop styling */
.drop-zone {
    position: relative;
    flex-grow: 1;
}

.drop-zone textarea {
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.drop-zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(74, 108, 247, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.drop-zone.drag-over .drop-zone-overlay {
    opacity: 1;
    visibility: visible;
}

.drop-zone-overlay i {
    font-size: 48px;
    margin-bottom: 15px;
}

.drop-zone-overlay p {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.dark-theme .drop-zone-overlay {
    background-color: rgba(74, 108, 247, 0.8);
}

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

.drop-zone.drag-over .drop-zone-overlay i {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Update the drop zone styling to make it more intuitive */
.drop-zone::after {
    content: "Drag and drop a file here or paste your code";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.4;
    white-space: nowrap;
    z-index: 1;
}

/* Hide the message when there's text in the textarea */
.drop-zone:has(textarea:not(:placeholder-shown))::after {
    display: none;
}

/* For browsers that don't support :has */
.drop-zone.has-content::after {
    display: none;
}

/* Complete fixed keyboard shortcuts styling */
.shortcuts-panel {
    padding: 15px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.shortcuts-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 16px;
}

.shortcuts-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.shortcuts-panel li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

.shortcuts-panel li:last-child {
    margin-bottom: 0;
}

.shortcuts-panel kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    padding: 3px 6px;
    font-family: var(--font-code);
    font-size: 0.85em;
    color: #444;
    background-color: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,.12);
}

.dark-theme .shortcuts-panel kbd {
    color: #f8f9fa;
    background-color: #2d2d2d;
    border-color: #444;
}

.shortcut-plus {
    display: inline-flex;
    justify-content: center;
    width: 30px;
    color: var(--text-light);
    font-weight: 500;
}

.shortcut-description {
    margin-left: 15px;
    flex-grow: 1;
    text-align: left;
}

.shortcut-note {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

.toggle-shortcuts {
    margin: 0 auto;
    display: flex;
} 

@keyframes heartbeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(1); }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); }
  }

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

  @keyframes wave {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(20deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
  }

  .footer {
    font-size: 16px;
    color: #555;
    text-align: center;
    margin-top: 50px;
  }

  .heart {
    color: red;
    font-size: 24px;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
  }

  .brain {
    color: #f28b82;
    font-size: 24px;
    display: inline-block;
    animation: pulse 2s infinite;
  }

  .wave {
    font-size: 24px;
    display: inline-block;
    animation: wave 1.5s infinite ease-in-out;
  }

