* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    background-color: #0c001f;
    overflow-x: hidden;
}
#particle-canvas {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 5%;
    background: rgba(12, 0, 31, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.nav-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}
.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}
.nav-links a:hover { color: #fff; }
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}
.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}
main {
    padding: 120px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
}
.page-title {
    text-align: center;
    margin-bottom: 40px;
}
.page-title h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 10px;
}
.page-title p {
    font-size: 1.1rem;
    color: #e0e0e0;
    max-width: 600px;
    margin: 0 auto;
}

.embed-creator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.controls-panel, .preview-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
}

.controls-panel h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-weight: 600;
    color: #c7c7c7;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.control-group input[type="text"],
.control-group textarea {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.control-group input[type="text"]:focus,
.control-group textarea:focus {
    outline: none;
    border-color: #b571ff;
    box-shadow: 0 0 8px rgba(181, 113, 255, 0.4);
}

.control-group textarea {
    resize: vertical;
    min-height: 80px;
}

.control-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
}
#color-picker {
    height: 40px;
    width: 40px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
}

hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 25px 0;
}

#fields-container .field-group {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.field-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.field-group-header span {
    font-weight: bold;
}
.remove-field-btn {
    background: #ff4c4c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 2px 8px;
}
.field-inline-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}
#add-field-btn {
    width: 100%;
}
.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.timestamp-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-mockup {
    background: #36393f;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.95rem;
}
.discord-message {
    display: flex;
}
.discord-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
}
.discord-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}
.discord-username {
    font-weight: 600;
    color: #fff;
}
.discord-bot-tag {
    background-color: #7289da;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 500;
}
.discord-timestamp {
    color: #72767d;
    font-size: 0.75rem;
    margin-left: 8px;
}
.discord-message-text {
    color: #dcddde;
    word-break: break-word;
}
.discord-embed {
    background: #2f3136;
    border-left: 4px solid #8a4fff;
    border-radius: 4px;
    margin-top: 8px;
    display: flex;
    padding: 8px 12px;
    max-width: 520px;
    position: relative;
}
.embed-content {
    flex: 1;
    min-width: 0;
}
.embed-color-pill {
    width: 4px;
    background-color: #8a4fff;
    border-radius: 4px 0 0 4px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}
.embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.embed-author-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.embed-author-name {
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}
.embed-author-name:hover {
    text-decoration: underline;
}
.embed-title {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
    text-decoration: none;
}
.embed-title:hover {
    text-decoration: underline;
}
.embed-description {
    font-size: 0.875rem;
    color: #dcddde;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.embed-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.embed-field {
    font-size: 0.875rem;
    flex: 1 1 100%;
}
.embed-field.inline {
   flex: 1 1 auto;
   min-width: 150px;
}
.embed-field-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}
.embed-field-value {
    color: #dcddde;
    word-break: break-word;
}
.embed-image-wrapper {
    margin-top: 12px;
}
.embed-image {
    max-width: 100%;
    border-radius: 4px;
}
.embed-thumbnail {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
    margin-left: 16px;
    object-fit: contain;
}
.embed-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #c7c7c7;
    margin-top: 8px;
}
.embed-footer-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}
.embed-footer-separator::before {
    content: "•";
    margin: 0 4px;
}

.json-output-panel {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}
.json-output-panel h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.json-container {
    position: relative;
}
#json-output {
    background: #202225;
    color: #b9bbbe;
    padding: 15px;
    border-radius: 8px;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Consolas', 'Courier New', monospace;
}
#copy-json-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #7289da;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
#copy-json-btn:hover {
    background: #5b6eae;
}
#copy-json-btn svg {
    width: 18px;
    height: 18px;
}

.main-footer-bottom {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    color: #aaa;
}

@media (max-width: 1200px) {
    .embed-creator-layout {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        order: -1;
    }
}
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
        background: rgba(20, 1, 46, 0.9);
        backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 30px; transition: right 0.4s ease-in-out;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.5rem; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    main { padding-top: 100px; }
    .page-title h1 { font-size: 2.5rem; }
    .control-group-grid { grid-template-columns: 1fr; }
}