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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    padding: 15px;
    color: #333;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 5px;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.description {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.input-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

#charInput {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    text-align: center;
    border: 3px solid #667eea;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

#charInput:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

#charInput::placeholder {
    color: #ccc;
    font-size: 1.2rem;
}

.result {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: auto;
    display: flex;
    gap: 20px;
    height: fit-content;
    max-height: calc(100vh - 200px);
}

.result.hidden .char-display,
.result.hidden .info-grid {
    opacity: 0.3;
}

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

.char-display {
    font-size: 6rem;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    width: 200px;
    height: fit-content;
    align-self: flex-start;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    flex: 1;
    align-content: start;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 15px;
    border-left: 4px solid #667eea;
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    padding: 6px 8px;
    margin-left: -8px;
    margin-right: -8px;
    border-bottom: 1px solid #e9ecef;
    cursor: help;
    position: relative;
    border-radius: 4px;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-right: 10px;
}

.value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: flex-end;
    flex: 1;
}

.value {
    color: #212529;
    font-size: 0.85rem;
    text-align: right;
    word-break: break-all;
}

.value.code {
    font-family: 'Courier New', Courier, monospace;
    background: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #dee2e6;
    display: inline-block;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.5;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.copy-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(0.9);
}

.copy-btn img {
    width: 16px;
    height: 16px;
    display: block;
}

.copy-btn.copied {
    opacity: 1;
}

.copy-btn.copied img {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(98%) contrast(119%);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .result {
        flex-direction: column;
    }

    .char-display {
        width: 100%;
        max-width: 100%;
        align-self: center;
    }

    .info-grid {
        width: 100%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }

    #charInput {
        font-size: 2.5rem;
        width: 80px;
        height: 80px;
    }

    .char-display {
        font-size: 5rem;
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .value {
        text-align: left;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .input-section,
    .result {
        padding: 20px;
    }

    .char-display {
        font-size: 4rem;
    }
}
