:root {
    --black: #0c0c0c;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #808080;
    --gray-dark: #333333;
    --accent: #00ff00;
    --accent-hover: #00cc00;
    --error: #ff4444;
    --dark-green: #00cc00;
    --light-green: #00ff00;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Split Layout Styles */
.split-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    /* Account for header */
    width: 100%;
    gap: 15px;
    padding: 15px;
}

.split-pane {
    min-width: 0;
    /* Prevent flex items from overflowing */
    height: calc(100vh - 80px);
    /* Account for header and padding */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--black);
}

/* Left pane (form) takes up 25% */
.split-pane.upload-container {
    flex: 1;
    /* 1 part out of 4 */
}

/* Right pane (history) takes up 75% */
.split-pane.history-section {
    flex: 3;
    /* 3 parts out of 4 */
}

.split-pane::-webkit-scrollbar {
    width: 8px;
}

.split-pane::-webkit-scrollbar-track {
    background: var(--black);
}

.split-pane::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
    border: 2px solid var(--black);
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: rgba(0, 255, 0, 0.05);
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    margin-bottom: 40px;
    padding: 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--light-green) !important;
    padding: 16px !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--accent) !important;
}

.nav-link {
    color: var(--white) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 16px !important;
}

.nav-link:hover {
    background-color: rgba(0, 255, 0, 0.1) !important;
    color: var(--accent) !important;
}

.nav-link i {
    margin-right: 8px;
}

/* Mobile Menu */
.mobile-menu {
    background-color: var(--black);
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

.mobile-menu .nav-link {
    padding: 12px 16px !important;
    display: block;
    width: 100%;
}


/* Footer Styles */
.footer {
    margin-top: 60px;
    padding: 40px 0 0 0;
    background-color: rgba(0, 255, 0, 0.05);
    border-top: 1px solid rgba(0, 255, 0, 0.1);
}

.footer-content {
    margin-bottom: 30px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section .nav-link {
    padding: 8px 16px !important;
}

.footer-bottom {
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        height: 100%;
    }

    .split-pane {
        height: calc(100vh - 80px);
        min-height: 600px;
    }

    .container {
        padding: 0 10px;
    }

    .upload-container {
        padding: 0px;
    }

    .slider-container {
        height: 924px;
    }

    .footer-section {
        text-align: center;
    }
}

/* Mobil ekranlar için */
@media (max-width: 768px) {
    .slider-container {
        height: 500px;
    }
}

/* Upload Container Styles */
.upload-container {
    background: rgb(118 118 118 / 5%);
    border-radius: 12px;
    padding: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray);
    font-size: 14px;
}

.upload-area {
    position: relative;
    width: 100%;
    height: 350px;
    border: 2px dashed var(--dark-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: rgba(76, 175, 80, 0.05);
}

.upload-area:hover {
    border-color: var(--accent);
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    text-align: center;
    color: var(--gray);
}

.upload-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--accent);
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.upload-area.has-image .upload-placeholder {
    display: none;
}

.upload-area.has-image .upload-preview {
    display: block;
}

/* Form Controls */
select,
input[type="number"] {
    width: 100%;
    padding: 12px;
    background: var(--black);
    border: 1px solid var(--dark-green);
    border-radius: 6px;
    color: var(--white);
    font-size: 14px;
    transition: all 0.3s ease;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select::-ms-expand {
    display: none;
}

select option {
    background: var(--black);
    color: var(--white);
    padding: 16px;
    font-size: 14px;
    border: none;
    outline: none;
}

select option:hover,
select option:focus,
select option:active {
    background: var(--dark-green);
    color: var(--white);
}

select option:checked {
    background: var(--dark-green);
    color: var(--white);
}

/* Remove default styling */
select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Custom styling for the dropdown */
select:focus option {
    margin: 4px 0;
    padding: 16px;
    background: var(--black);
    color: var(--white);
}

/* Webkit specific styles */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select {
        background-color: var(--black);
    }

    select option {
        margin: 4px 0;
        padding: 16px;
        background: var(--black);
        color: var(--white);
    }

    select option:checked {
        background: var(--dark-green);
        color: var(--white);
    }
}

select:focus,
input[type="number"]:focus {
    border-color: var(--accent);
    outline: none;
}

.range-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.range-group input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.range-value {
    min-width: 60px;
    text-align: right;
    font-family: monospace;
    color: var(--accent);
}

/* Base button styles */
button {
    width: 100%;
    padding: 16px;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 60px;
}

button:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

button i {
    font-size: 20px;
}

/* Enhance button style */
.enhance-submit-btn {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.enhance-submit-btn:hover {
    background: linear-gradient(135deg, #00cc00, #00ff00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.3);
}

/* Upscale button style */
.upscale-submit-btn {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.upscale-submit-btn:hover {
    background: linear-gradient(135deg, #00cc00, #00ff00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.3);
}

#submitButton {
    width: 100%;
    padding: 20px;
    border-radius: 8px;
    margin-left: auto;
}

#submitButton i {
    font-size: 24px;
}

/* Status Messages */
.status {
    margin: 0 0 16px 0;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.status.error {
    display: block;
    background: rgba(255, 68, 68, 0.1);
    color: var(--error);
}

.status.success {
    display: block;
    background: rgba(0, 255, 0, 0.1);
    color: var(--accent);
}

.status.info {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent);
}

/* History Section */
.history-section {
    background: rgb(118 118 118 / 5%);
    border-radius: 12px;
    padding: 30px;
    display: block !important;
    /* Always show history section */
    height: calc(100vh - 100px);
    /* Ekran yüksekliğine göre ayarla */
    overflow-y: auto;
    /* Dikey scroll ekle */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--black);
}

.history-section::-webkit-scrollbar {
    width: 8px;
}

.history-section::-webkit-scrollbar-track {
    background: var(--black);
}

.history-section::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
    border: 2px solid var(--black);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.history-clear {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--gray);
    border-radius: 4px;
    color: var(--gray);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
}

.history-clear:hover {
    border-color: var(--error);
    color: var(--error);
    background: none;
}

.history-grid {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}

.history-item {
    background: linear-gradient(145deg, rgba(12, 12, 12, 0.95), rgba(76, 175, 80, 0.05));
    border-radius: 12px;
    overflow: hidden;
    border: 5px solid rgba(42, 48, 42, 0.2);
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.history-item:hover {
    transform: translateY(0px);
    border-color: rgba(54, 54, 54, 0.4);
    box-shadow: 0 6px 20px rgba(37, 37, 37, 0.15);
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.processing-overlay img {
    max-width: 100%;
    max-height: 100%;
    opacity: 0.15;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: grayscale(100%) blur(4px);
    transform: scale(1.05);
    transition: all 0.3s ease;
    background-color: var(--black);
}

.processing-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 0, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    z-index: 5;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    margin: 0 auto;
}

.processing-overlay .processing-text {
    color: var(--accent);
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
    text-align: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

/* Before/After Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 924px;
    overflow: hidden;
    background: var(--black);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-container.processing {
    opacity: 0.7;
    pointer-events: none;
}

.slider-before,
.slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    transition: clip-path 0.1s ease-out;
}

.slider-after {
    z-index: 1;
    /* İşlenmiş görsel arka planda */
}

.slider-before {
    z-index: 2;
    clip-path: inset(0 calc(100% - var(--position, 50%)) 0 0);
    will-change: clip-path;
    transition: clip-path 0.1s ease-out;
}

.slider-before img,
.slider-after img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    cursor: ew-resize;
    z-index: 100;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    will-change: left;
    transition: left 0.1s ease-out;
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.slider-handle::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border: 3px solid var(--white);
    border-radius: 50%;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
    will-change: transform;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.slider-handle:hover::after {
    transform: translateY(-50%) scale(1.1);
}

.slider-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-btn {
    background: linear-gradient(145deg, #1a1a1a, #00cc00);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-btn:hover {
    background: linear-gradient(145deg, #00cc00, #00ff00);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.enhance-btn {
    background: linear-gradient(145deg, #1a1a1a, #2d5a27);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.enhance-btn:hover {
    background: linear-gradient(145deg, #2d5a27, #4CAF50);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.enhance-btn i {
    font-size: 16px;
    color: var(--white);
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(76, 175, 80, 0.7);
    border: none;
    color: white;
    font-size: 18px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.remove-image-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

/* Select kutusunun tüm tarayıcılarda özelleştirilmesi */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--black) !important;
    border: 1px solid var(--dark-green) !important;
    color: var(--white) !important;
    padding: 10px;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
}

select:focus,
select:hover {
    background-color: var(--black) !important;
    color: var(--white) !important;
    border-color: var(--accent) !important;
    outline: none !important;
    box-shadow: none !important;
}

select option {
    background-color: var(--black) !important;
    color: var(--white) !important;
    padding: 10px;
    border: none;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: var(--dark-green) !important;
    color: var(--white) !important;
}

select::-ms-expand {
    display: none;
}

@-moz-document url-prefix() {
    select {
        background-color: var(--black) !important;
    }

    select option:checked,
    select option:hover {
        background-color: var(--dark-green) !important;
        color: var(--white) !important;
    }
}

::-webkit-selection {
    background: transparent !important;
}

::-webkit-selection {
    background: transparent !important;
    color: inherit !important;
}

::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

.magic-btn {
    background: linear-gradient(135deg, #000000, #00ff00, #000000);
    background-size: 200% 200%;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: 2px solid #00ff00;
    outline-offset: -2px;
}

.magic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(46, 204, 113, 0);
    }

    50% {
        border-color: rgba(46, 204, 113, 0.5);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

.magic-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 5px 15px rgba(46, 204, 113, 0.3),
        0 0 30px rgba(46, 204, 113, 0.2);
    background-position: 100% 50%;
}

.magic-btn:hover::before {
    animation: borderGlow 1s ease-in-out infinite;
}

.magic-btn:active {
    transform: translateY(1px);
}

.magic-btn .sparkle {
    position: absolute;
    pointer-events: none;
}

.magic-btn .sparkle:nth-child(1) {
    left: 20%;
    top: 20%;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

.magic-btn .sparkle:nth-child(2) {
    right: 20%;
    bottom: 20%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite 0.5s;
}

.magic-btn .sparkle:nth-child(3) {
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite 1s;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.magic-btn i {
    margin-right: 6px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}