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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #000428;
    background: linear-gradient(to bottom, #000428, #004e92);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffffff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(135, 206, 235, 0.5);
}

.subtitle {
    font-size: 1.2em;
    color: #87ceeb;
    margin-bottom: 20px;
}

.language-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 5px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #87ceeb;
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.5);
}

main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

#starCanvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.star-info {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #87ceeb;
    padding: 15px;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.5);
}

.star-info input {
    background: transparent;
    border: 1px solid #87ceeb;
    color: #ffffff;
    padding: 5px 10px;
    margin-right: 10px;
    border-radius: 5px;
}

.star-info button {
    background: #87ceeb;
    border: none;
    color: #000000;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.star-info button:hover {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.controls {
    width: 300px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 25px;
}

.control-group h3 {
    color: #87ceeb;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-btn,
.bg-btn {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mode-btn:hover,
.bg-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.mode-btn.active,
.bg-btn.active {
    background: rgba(135, 206, 235, 0.3);
    border-color: #87ceeb;
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.5);
}

#constellationName,
#constellationStory {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#constellationStory {
    min-height: 80px;
    resize: vertical;
}

#constellationName:focus,
#constellationStory:focus {
    outline: none;
    border-color: #87ceeb;
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.3);
}

#clearCanvas,
#saveImage,
#shareConstellation {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid;
    color: #ffffff;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#clearCanvas {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

#clearCanvas:hover {
    background: rgba(255, 107, 107, 0.2);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

#saveImage {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

#saveImage:hover {
    background: rgba(78, 205, 196, 0.2);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

#shareConstellation {
    border-color: #f7b731;
    color: #f7b731;
}

#shareConstellation:hover {
    background: rgba(247, 183, 49, 0.2);
    box-shadow: 0 0 10px rgba(247, 183, 49, 0.5);
}

footer {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .controls {
        width: 100%;
        height: 200px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    h1 {
        font-size: 2em;
    }
    
    .language-switch {
        position: static;
        margin-top: 10px;
    }
}

/* アニメーション */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* カスタムスクロールバー */
.controls::-webkit-scrollbar {
    width: 8px;
}

.controls::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.controls::-webkit-scrollbar-thumb {
    background: rgba(135, 206, 235, 0.5);
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb:hover {
    background: rgba(135, 206, 235, 0.8);
}