:root {
    --primary: #FF5722;
    --primary-hover: #FF5722;
    --secondary: #2b2d42;
    --bg: #f8f9fa;
    --text: #1d3557;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);

    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.layout-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.layout-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--secondary);
}

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

main {
    flex: 1;
}

.editor-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    /* aspect-ratio JS tarafından dinamik olarak set edilir */
    background: #eee;
    border-radius: calc(var(--radius) - 4px);
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    cursor: grab;
}

canvas:active {
    cursor: grabbing;
}

.drop-zone {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.drop-zone:hover {
    background: rgba(230, 57, 70, 0.05);
}

.drop-zone-content {
    text-align: center;
    color: #adb5bd;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-zone-content svg {
    color: var(--primary);
}

.drop-zone-content span {
    font-weight: 600;
}

.controls-section {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f1f3f5;
    color: var(--secondary);
}

.btn-secondary:hover {
    background: #e9ecef;
}

.help-text {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

footer {
    text-align: center;
    padding-top: 2rem;
    color: #adb5bd;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2.2rem;
    }

    .editor-section {
        padding: 1rem;
    }
}