@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(184, 134, 11, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border-radius: 24px;
    padding: 60px;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    text-align: center;
    color: #8b8b8b;
    font-size: 1.3em;
    margin-bottom: 50px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 3px;
}

/* Brand Name Section */
.brand-name-section {
    max-width: 700px;
    margin: 0 auto 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
    padding: 35px 40px;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.brand-name-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.brand-name-section label {
    display: block;
    color: #d4af37;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Montserrat', sans-serif;
}

.brand-name-section input {
    width: 100%;
    padding: 18px 25px;
    font-size: 1.8em;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    letter-spacing: 1px;
}

.brand-name-section input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.15),
        0 8px 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
    background: #ffffff;
}

.brand-name-section input::placeholder {
    color: #999;
    font-weight: 300;
    font-style: italic;
}

/* Prism Container */
.prism-container {
    margin-bottom: 30px;
}

/* Legend */
.prism-legend {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.03) 0%, rgba(26, 26, 46, 0.01) 100%);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #000000;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.legend-color {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legend-color.external {
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
}

.legend-color.internal {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
}

/* Prism Wrapper */
.prism-wrapper {
    display: flex;
    gap: 0;
    position: relative;
}

/* Prism Divider */
.prism-divider {
    width: 2px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(212, 175, 55, 0.3) 20%,
        rgba(212, 175, 55, 0.6) 50%,
        rgba(212, 175, 55, 0.3) 80%,
        transparent
    );
    position: relative;
    margin: 0 30px;
}

.prism-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 3px solid #d4af37;
    border-radius: 50%;
    box-shadow:
        0 6px 20px rgba(212, 175, 55, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* Prism Sides */
.prism-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.side-label {
    text-align: center;
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.side-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: slide 3s infinite;
}

@keyframes slide {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.left-side .side-label {
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
    color: #ffffff;
    box-shadow:
        0 8px 20px rgba(26, 26, 46, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.right-side .side-label {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #ffffff;
    box-shadow:
        0 8px 20px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Prism Sections */
.prism-section {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.prism-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 16px 0 0 16px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.prism-section.external::before {
    background: linear-gradient(180deg, #1a1a2e 0%, #2c3e50 100%);
}

.prism-section.internal::before {
    background: linear-gradient(180deg, #d4af37 0%, #b8860b 100%);
}

.prism-section:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.prism-section:hover::before {
    width: 6px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prism-section h2 {
    font-family: 'Cormorant Garamond', serif;
    color: #000000;
    font-size: 1.65em;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.type-badge {
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.65em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(26, 26, 46, 0.2);
}

.prism-section.internal .type-badge {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #ffffff;
}

.description {
    color: #000000;
    font-size: 0.88em;
    margin-bottom: 18px;
    line-height: 1.5;
    font-weight: 400;
    opacity: 0.7;
}

textarea {
    width: 100%;
    min-height: 130px;
    padding: 16px 18px;
    border: 1.5px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.1),
        0 4px 20px rgba(212, 175, 55, 0.15);
    background: #ffffff;
}

.generate-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 100%);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.15);
    font-family: 'Montserrat', sans-serif;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    box-shadow: 0 6px 20px rgba(26, 26, 46, 0.25);
    transform: translateY(-2px);
    border-color: #d4af37;
}

.generate-btn:active {
    transform: translateY(0);
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 50px;
}

.save-btn, .clear-btn {
    padding: 16px 50px;
    border: 2px solid;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.save-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #ffffff;
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow:
        0 6px 25px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.save-btn:hover {
    background: linear-gradient(135deg, #b8860b 0%, #d4af37 100%);
    box-shadow:
        0 8px 35px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    border-color: #d4af37;
}

.clear-btn {
    background: transparent;
    color: #000000;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    opacity: 0.7;
}

.clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border-color: #000000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    opacity: 1;
}

.save-btn:active, .clear-btn:active {
    transform: translateY(-1px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    margin: 8% auto;
    padding: 40px;
    border-radius: 20px;
    width: 85%;
    max-width: 650px;
    position: relative;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.15);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #000000;
    font-size: 2em;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 1px;
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.5;
}

.close:hover {
    color: #000000;
    background: rgba(212, 175, 55, 0.1);
    transform: rotate(90deg);
    opacity: 1;
}

#suggestions {
    margin-top: 25px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

#suggestions::-webkit-scrollbar {
    width: 8px;
}

#suggestions::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.05);
    border-radius: 10px;
}

#suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-radius: 10px;
}

.suggestion-item {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    padding: 18px 20px;
    margin: 12px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #000000;
}

.suggestion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #d4af37 0%, #b8860b 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion-item:hover {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
    transform: translateX(8px);
    border-color: rgba(212, 175, 55, 0.3);
}

.suggestion-item:hover::before {
    width: 6px;
}

@media (max-width: 1024px) {
    .prism-wrapper {
        flex-direction: column;
    }

    .prism-divider {
        width: 100%;
        height: 4px;
        margin: 20px 0;
    }

    .prism-divider::before {
        top: 50%;
        left: 50%;
    }

    .prism-section:hover {
        transform: translateY(-5px);
    }

    .prism-legend {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .actions {
        flex-direction: column;
    }

    .save-btn, .clear-btn {
        width: 100%;
    }

    .side-label {
        font-size: 1em;
        letter-spacing: 2px;
    }

    .prism-section h2 {
        font-size: 1.2em;
    }

    .type-badge {
        font-size: 0.6em;
        padding: 3px 8px;
    }
}
