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

:root {
    --bg-dark: #0a0a1f;
    --bg-darker: #020208;
    --nebula-purple: #4a1e7a;
    --nebula-pink: #e94d8a;
    --nebula-blue: #3b9dd8;
    --text-primary: #e8e8f0;
    --text-secondary: #a8a8c0;
    --accent: #3b9dd8;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #020208;
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Space Canvas Background */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #020208;
}

/* Notification Container */
#notification-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.notification {
    background: linear-gradient(135deg, rgba(74, 30, 122, 0.95), rgba(59, 157, 216, 0.95));
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1rem 2rem;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    box-shadow: 0 0 30px rgba(59, 157, 216, 0.4);
    animation: slideDown 0.3s ease-out;
    pointer-events: auto;
    min-width: 300px;
    text-align: center;
}

.notification.success {
    border-color: #4ade80;
}

.notification.error {
    border-color: #ef4444;
}

.notification.info {
    border-color: var(--accent);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    animation: fadeIn 1.5s ease-out;
    pointer-events: none;
}

.container > * {
    pointer-events: auto;
}

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

/* Logo */
.logo-container {
    margin-bottom: 3rem;
    animation: float 6s ease-in-out infinite;
    position: relative;
}

.logo {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(59, 157, 216, 0.3));
    transition: filter 0.3s ease;
    position: relative;
    z-index: 1;
}

.logo:hover {
    filter: drop-shadow(0 0 60px rgba(59, 157, 216, 0.5));
}

.logo-decoy {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: auto;
    opacity: 0.000001;
    z-index: 2;
}

.logo-decoy:hover ~ .logo {
    filter: drop-shadow(0 0 60px rgba(59, 157, 216, 0.5));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Content */
.content {
    text-align: center;
    margin-bottom: 4rem;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    animation: slideIn 1s ease-out 0.3s both;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    animation: slideIn 1s ease-out 0.5s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contact */
.contact {
    animation: slideIn 1s ease-out 0.7s both;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.email {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.05em;
    padding: 0.8rem 2rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.locate-star-btn,
.update-sizes-btn {
    background: transparent;
    color: var(--nebula-pink);
    border: 1px solid var(--nebula-pink);
    border-radius: 2px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    padding: 0.8rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.update-sizes-btn {
    color: #f59e0b;
    border-color: #f59e0b;
}

.locate-star-btn::before,
.update-sizes-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 77, 138, 0.1), transparent);
    transition: left 0.5s ease;
}

.update-sizes-btn::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
}

.locate-star-btn:hover::before,
.update-sizes-btn:hover::before {
    left: 100%;
}

.locate-star-btn:hover {
    background: rgba(233, 77, 138, 0.05);
    box-shadow: 0 0 20px rgba(233, 77, 138, 0.3);
    transform: translateY(-2px);
}

.update-sizes-btn:hover {
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 157, 216, 0.1), transparent);
    transition: left 0.5s ease;
}

.email:hover::before {
    left: 100%;
}

.email:hover {
    background: rgba(59, 157, 216, 0.05);
    box-shadow: 0 0 20px rgba(59, 157, 216, 0.3);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        width: 200px;
    }

    .logo-decoy {
        width: 200px;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .email {
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 160px;
    }

    .logo-decoy {
        width: 160px;
    }

    .tagline {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .container {
        padding: 1rem;
    }
}

/* Star Dialogs */
.star-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 8, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.dialog-content {
    background: linear-gradient(135deg, rgba(74, 30, 122, 0.2), rgba(59, 157, 216, 0.2));
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(59, 157, 216, 0.3);
}

/* Custom scrollbar for dialog */
.dialog-content::-webkit-scrollbar {
    width: 6px;
}

.dialog-content::-webkit-scrollbar-track {
    background: rgba(10, 10, 31, 0.5);
    border-radius: 3px;
}

.dialog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--nebula-purple), var(--accent));
    border-radius: 3px;
    border: 1px solid rgba(59, 157, 216, 0.3);
}

.dialog-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent), var(--nebula-blue));
}

/* Firefox scrollbar */
.dialog-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(10, 10, 31, 0.5);
}

.dialog-content h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(10, 10, 31, 0.5);
    border: 1px solid rgba(59, 157, 216, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-cancel,
.btn-submit {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.btn-cancel:hover {
    background: rgba(168, 168, 192, 0.1);
    color: var(--text-primary);
}

.btn-submit {
    background: var(--accent);
    color: #020208;
    font-weight: 500;
}

.btn-submit:hover {
    background: #4db0ea;
    box-shadow: 0 0 20px rgba(59, 157, 216, 0.4);
    transform: translateY(-2px);
}

/* Star Details */
.star-details {
    margin: 1.5rem 0;
}

.star-details p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.star-details strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.color-preview {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: monospace;
}

.star-message {
    background: rgba(10, 10, 31, 0.3);
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    font-style: italic;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.star-id-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    margin: -0.5rem 0 1.5rem;
    font-family: monospace;
    opacity: 0.7;
}

/* Custom Color Picker */
.color-picker-custom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#color-canvas {
    width: 100%;
    height: 150px;
    border-radius: 4px;
    border: 1px solid rgba(59, 157, 216, 0.3);
    cursor: crosshair;
}

.color-preview-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-preview-display {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #ffffff;
}

#color-hex-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-primary);
}
