:root {
    --bg-gradient: #ffffff;
    /* Changed to white as requested */
    --text-color: #0D2B5E;
    /* Dark text for white background */
    --accent-color: #ff0055;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --device-frame: #111;
    --device-border: #333;
}

/* ... existing code ... */

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    /* Reduced margin */
    color: #fff;
    /* Keep title white inside dark box */
    z-index: 10;
    position: relative;
    text-align: center;
    width: 100%;
}

/* Scoped to not break global site reset if possible, or just accept it */
/* Removed * { box-sizing... } as it's likely global already */

body.body1 {
    /* Merging with existing body class if needed, or overriding specific to this page container if possible. 
       However, user requested body styles. */
    background: var(--bg-gradient) !important;
    color: var(--text-color);
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    z-index: 10;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.highlight {
    color: var(--accent-color);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    color: #ccc;
}

.input-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    width: 600px;
    max-width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0 auto;
}

.input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(255, 0, 85, 0.2);
    border-color: rgba(255, 0, 85, 0.5);
}

input[type="url"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
}

button#go-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    font-family: 'Outfit', sans-serif;
}

button#go-btn:hover {
    background: #ff3377;
    transform: scale(1.05);
}

button#go-btn:active {
    transform: scale(0.95);
}

/* PREVIEW STAGE */
.preview-stage {
    position: relative;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    height: auto;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    overflow: visible;
}

.devices-container {
    position: relative;
    width: 100%;
    min-height: 650px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Shift right to compensate for asymmetric device positioning
       (Laptop extends ~500px left, Tablet/Mobile extend ~360px right. Center is ~70px left of origin) */
    transform: translateX(70px);
    overflow: visible;
}

/* Ambient Glow */
.devices-container::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 0, 85, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

/* GENERIC DEVICE STYLES */
.device {
    background: var(--device-frame);
    border: 2px solid var(--device-border);
    border-radius: 20px;
    position: absolute;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s ease;
}

.device .screen {
    background: white;
    overflow: hidden;
    position: relative;
}

.device iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    transform-origin: 0 0;
    width: 100%;
    height: 100%;
}

/* DESKTOP (1600x900 -> Scale 0.3625) */
.desktop {
    width: 620px;
    height: 400px;
    padding: 20px 20px 40px 20px;
    border-radius: 10px;
    z-index: 1;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.desktop .screen {
    width: 580px;
    height: 326px;
    margin: 0 auto;
}

.desktop iframe {
    width: 1600px !important;
    height: 900px !important;
    transform: scale(0.3625);
}

.desktop .base {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #222;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.desktop .base::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -40px;
    width: 200px;
    height: 10px;
    background: #222;
    border-radius: 5px;
}

/* LAPTOP (1280x800 -> Scale 0.336) */
.laptop {
    width: 460px;
    height: 290px;
    padding: 15px 15px 30px 15px;
    border-radius: 12px;
    z-index: 2;
    top: 200px;
    left: 50%;
    transform: translateX(-110%);
}

.laptop .screen {
    width: 430px;
    height: 269px;
}

.laptop iframe {
    width: 1280px !important;
    height: 800px !important;
    transform: scale(0.3359);
}

.laptop .keyboard {
    position: absolute;
    bottom: -15px;
    left: -20px;
    right: -20px;
    height: 15px;
    background: #222;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    transform: perspective(200px) rotateX(10deg);
}

/* TABLET (768x1024 -> Scale 0.338) */
.tablet {
    width: 280px;
    height: 380px;
    padding: 20px 10px;
    border-radius: 20px;
    z-index: 3;
    top: 150px;
    left: 50%;
    transform: translateX(30%);
}

.tablet .screen {
    width: 260px;
    height: 340px;
    margin: 0 auto;
}

.tablet iframe {
    width: 768px !important;
    height: 1024px !important;
    transform: scale(0.3385);
}

/* MOBILE (375x667 -> Scale 0.346) */
.mobile {
    width: 150px;
    height: 280px;
    padding: 15px 10px;
    border-radius: 25px;
    z-index: 4;
    top: 280px;
    left: 50%;
    transform: translateX(140%);
    background: #000;
}

.mobile .screen {
    width: 130px;
    height: 230px;
    border-radius: 2px;
    margin: 0 auto;
}

.mobile iframe {
    width: 375px !important;
    height: 667px !important;
    transform: scale(0.346);
}

.mobile .home-button {
    width: 20px;
    height: 20px;
    border: 1px solid #333;
    border-radius: 50%;
    margin: 10px auto 0;
}

/* Adjustments for responsiveness of the tool itself */
@media (max-width: 1200px) {
    .preview-stage {
        transform: scale(0.8);
        transform-origin: top center;
    }

    .project-item {
        padding: 25px;
    }
}

@media (max-width: 900px) {
    .preview-stage {
        transform: scale(0.6);
        height: 400px;
    }

    .devices-container {
        flex-direction: column;
        align-items: center;
    }

    .device {
        position: relative;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin-bottom: 20px;
    }
}

/* Container and Heading Styles */
.finishing-projects-container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.projects-heading {
    margin-bottom: 60px;
}

/* PROJECTS GRID LAYOUT */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-item {
    background: transparent;
    border: none;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    min-height: 650px;
    transition: transform 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    /* Removed shadow on hover as well, or keep subtle one? User said remove boxes */
    box-shadow: none;
    border-color: transparent;
}

.project-title {
    font-size: 2.0rem;
    font-weight: 700;
    margin-bottom: 20px;
    /* Reduced margin */
    color: #0D2B5E;
    /* Changed to Dark color for white background */
    z-index: 10;
    position: relative;
    text-align: center;
    width: 100%;
}

/* Adjust responsive-stage for grid items */
.project-item .responsive-stage {
    width: 100%;
    min-height: 450px;
    height: auto;
    /* Adjusted height to fit content tightly */
    margin: 0;
    transform: scale(0.65);
    /* Slightly bigger */
    transform-origin: center center;
    /* Center scaling */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* Ensure the absolute container inside is centered correctly */
.project-item .devices-container {
    left: 0;
    /* Override any potential shifts */
    transform: none;
    overflow: visible;
}

/* Tablet responsive ayarları */
@media (max-width: 992px) {
    .finishing-projects-container {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .projects-heading {
        margin-bottom: 40px;
    }

    .projects-heading h2 {
        font-size: 1.75rem;
    }

    .projects-heading p {
        font-size: 0.95rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-item {
        padding: 20px;
        min-height: 480px;
    }

    .project-item .responsive-stage {
        /* Remove fixed scale, let JS handle it or use a base scale */
        transform: none;
        width: 100%;
        height: auto;
        min-height: 350px;
        /* Reserve space */
        margin-top: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Hide other devices */
    .laptop,
    .tablet,
    .mobile,
    .devices-container::before {
        display: none !important;
    }

    /* Reset Container */
    .devices-container {
        transform: none;
        left: 0;
        width: 100%;
        perspective: none;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Simplify Desktop (iMac) */
    .desktop {
        position: relative;
        width: 100%;
        max-width: 800px;
        /* Allow growth up to 800px */
        height: auto;
        padding: 10px;
        top: 0;
        left: 0;
        transform: none !important;
        /* Remove 3D transforms */
        opacity: 1;
        margin: 0 auto;
    }

    .desktop .screen {
        width: 93%;
        /* Relative width */
        height: 0;
        padding-bottom: 56.25%;
        /* 16:9 Aspect Ratio */
        margin: 0 auto;
        position: relative;
        overflow: hidden;
    }

    .desktop iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 1600px !important;
        height: 900px !important;
        transform-origin: top left;
        /* Transform Scale is set via JS for responsiveness */
    }
}

/* Specific small mobile adjustments if needed */
@media (max-width: 576px) {
    .projects-heading {
        margin-bottom: 30px;
    }

    .project-item {
        padding: 15px;
    }

    /* Height adjustments handled by fluid height now */
}