@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    background: linear-gradient(135deg, #1f1c2c, #928dab);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin: 20px;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-size: 2rem;
    background: linear-gradient(90deg, #00ff66, #e52e71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

canvas {
    border: 2px solid #444;
    margin: 20px auto;
    cursor: pointer;
    background-color: #1e1e1e;
    display: block;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    transition: transform 0.2s ease;
}
canvas:hover {
    transform: scale(1.02);
}

.controls {
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.controls input,
.controls button {
    margin: 6px;
    padding: 10px 14px;
    background: #2c2c54;
    color: white;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.controls button {
    cursor: pointer;
    background: linear-gradient(45deg, #00ff66, #06781b);
    border: none;
}
.controls button:hover {
    background: linear-gradient(45deg, #00ff66, #ff512f);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

#textInput {
    width: 300px;
    background-color: #1a1a1a;
    border: 1px solid #555;
    color: #eaeaea;
}

#fontSizeLabel {
    display: inline-block;
    width: 25px;
    text-align: center;
    font-weight: bold;
    color: #ffd369;
}

.watermark {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.imgur-link-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

.imgur-link-container input {
    width: 70%;
    padding: 8px;
    margin-right: 8px;
    background: #222;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
}

.imgur-link-container button {
    padding: 8px 12px;
    cursor: pointer;
    background: linear-gradient(45deg, #3a2c72, #6d4fc2);
    color: white;
    border: none;
    border-radius: 5px;
    transition: background 0.3s;
}
.imgur-link-container button:hover {
    background: linear-gradient(45deg, #6d4fc2, #3a2c72);
}

.imgur-link-container button:last-child {
    background: #ff4444;
}
.imgur-link-container button:last-child:hover {
    background: #ff6b6b;
}

/* Mobile */
body.mobile #textInput {
    width: 90%;
}
body.mobile canvas {
    max-width: 100%;
    height: auto;
}
body.mobile .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* === IKLAN KIRI & KANAN === */

.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.editor-area {
    display: flex;
    justify-content: center;
}

.ad-banner {
    width: 160px;
    min-height: 600px;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.ad-banner p {
    font-size: 12px;
    color: #ffd369;
    font-weight: bold;
    margin-bottom: 8px;
}

.ad-banner img {
    width: 100%;
    border-radius: 6px;
}

/* HP: IKLAN HILANG */
body.mobile .ad-banner {
    display: none;
}

/* === TOP ADS TRAY === */

.ads-tray {
    position: fixed;
    top: -150px;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    transition: top 0.5s ease;
    z-index: 9999;
    padding: 10px 0;
}

.ads-tray.show {
    top: 0;
}

.ads-content {
    position: relative;
    text-align: center;
}

.ads-content img {
    max-width: 90%;
    border-radius: 8px;
}

.ads-label {
    display: block;
    font-size: 12px;
    color: #ffd369;
    margin-bottom: 5px;
}

.ads-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    border: none;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
}
.ads-close:hover {
    background: #ff6b6b;
}
.ads-content iframe {
    max-width: 100%;
}
