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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    height: 100vh;
    width: 100vw;
}

/* HEADER */
h1 {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 60px;
}

/* LAYOUT */
.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.layout {
    display: flex;
    flex: 1;
    gap: 80px;
    margin-top: 20px;
}

/* LEFT */
.left {
    flex: 1;
    max-width: 240px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* UPLOAD */
.upload-box {
    width: 220px;
    height: 110px;

    border: 1.5px solid #d1d5db;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    background: white;

    font-weight: 500;
    transition: 0.2s;
}

.upload-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

#preview {
    width: 220px;
    height: 160px;

    object-fit: cover;

    border-radius: 10px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.08);

    display: block;
}

/* BUTTON */
button {
    width: 220px;
    padding: 12px;

    background: #4f46e5;
    color: white;

    border: none;
    border-radius: 8px;

    cursor: pointer;
}

button:hover {
    background: #3730a3;
}

/* RIGHT */
.right {
    flex: 1.6;
    display: flex;
    flex-direction: column;
}

/* CARDS */
.card {
    border-radius: 12px;
    padding: 14px;

    height: 280px;

    display: flex;
    flex-direction: column;

    box-shadow: 0 2px 10px rgba(0,0,0,0.05);

    overflow: hidden;
position: relative;

}

/* CODE CARD */
.code-card {
    background: #111827;
    color: white;
}

/* PREVIEW CARD */
.preview-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}



/* CONTENT */
#code, #render {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* CODE STYLE */
#code {
    font-family: monospace;
    white-space: pre-wrap;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;
}

.card-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

/* Titel bleibt links */
.card-title {
    font-size: 12px;
    text-transform: uppercase;
    color: gray;
    margin-bottom: 10px;
}

/* COPY BUTTON (ChatGPT STYLE) */
.copy-btn {
    position: absolute;
    top: 0;
    right: 0;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;

    color: #9ca3af;

    cursor: pointer;

    z-index: 10;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.code-card .copy-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-btn {
    width: 42px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: white;
    color: #374151;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.15s ease;
}

.pdf-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}