/* SandboxCafe 基本レイアウト・ヘッダースタイル */

/* 基本リセット・背景設定 */
body {
    background: linear-gradient(135deg, #f5f3f0 0%, #faf8f5 100%) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.6 !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
}

/* メインヘッダー */
.main-header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-section h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    color: #8B4513;
    transform: translateY(-1px);
}

/* ヒーローセクション */
.hero-section {
    text-align: center;
    margin: 2rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #F5E6D3 0%, #FAF0E6 100%);
    border-radius: 15px;
    border: 2px solid #DEB887;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
}

.hero-title {
    font-size: 2.5rem;
    color: #8B4513;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #A0522D;
    opacity: 0.9;
}

/* 情報セクション */
.info-section {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #DEB887;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.1);
}

.info-section h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-section p {
    color: #5D4037;
    line-height: 1.6;
    margin: 0;
}
.sandbox-cafe-container {
    max-width: 1400px !important;
    margin: 2rem auto 0 auto !important;
    padding: 2rem !important;
    background: linear-gradient(135deg, #f5f3f0 0%, #faf8f5 100%) !important;
    min-height: calc(100vh - 70px) !important;
    position: relative !important;
    z-index: 1 !important;
}

.sandbox-cafe-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
    background-image: url('../images/cafe.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #8B4513 !important;
    color: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3) !important;
    position: relative !important;
    display: block !important;
}

.sandbox-cafe-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 69, 19, 0.4);
    border-radius: 15px;
    z-index: 1;
}

.sandbox-cafe-header > * {
    position: relative;
    z-index: 2;
}

.sandbox-cafe-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.sandbox-cafe-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.trial-banner {
    background: linear-gradient(135deg, #DEB887 0%, #D2B48C 100%) !important;
    color: #8B4513 !important;
    padding: 1rem 2rem !important;
    border-radius: 10px !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    border: 2px solid #CD853F !important;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.2) !important;
    display: block !important;
}

.trial-banner h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.trial-countdown {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.pricing-info {
    font-size: 1rem;
    opacity: 0.8;
}

.main-content {
    display: grid !important;
    grid-template-columns: 4fr 6fr !important;
    gap: 2rem !important;
    margin: 2rem 0 !important;
    width: 100% !important;
    position: relative !important;
}

.sandbox-section, .chat-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    border: 1px solid #E5D5C8;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F5E6D3;
}

.section-header h2 {
    color: #8B4513;
    margin: 0;
    font-size: 1.5rem;
}

.section-icon {
    font-size: 1.8rem;
}

/* 通知・バナー共通スタイル */
.hospital-notice {
    background: linear-gradient(135deg, #F5E6D3 0%, #FAF0E6 100%);
    border: 2px solid #DEB887;
    border-radius: 10px;
    padding: 1rem;
    color: #8B4513;
    font-size: 0.9rem;
    text-align: center;
}

.hospital-notice strong {
    color: #A0522D;
}

/* APIサンドボックス用スタイル */
.form-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #E5D5C8;
    border-radius: 10px;
    background: #FEFDFB;
}

.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #8B4513;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #8B4513;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E5D5C8;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: #5D4037;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #CD853F;
    box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.1);
}

.form-group textarea {
    height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.btn {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background: linear-gradient(135deg, #654321 0%, #8B4513 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62 0%, #4e555b 100%);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.webapp-list {
    border: 2px solid #E5D5C8;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
}

.webapp-item {
    padding: 1rem;
    border-bottom: 1px solid #F5E6D3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webapp-item:last-child {
    border-bottom: none;
}

.webapp-name {
    font-weight: 500;
    color: #8B4513;
}

.webapp-url {
    font-size: 0.9rem;
    color: #A0522D;
}

.webapp-actions {
    display: flex;
    gap: 0.5rem;
}

.url-counter {
    background: linear-gradient(135deg, #F5E6D3 0%, #FAF0E6 100%);
    border: 2px solid #DEB887;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #8B4513;
}

.no-data {
    text-align: center;
    color: #A0522D;
    padding: 2rem;
    font-style: italic;
}

/* オーバーレイ・モーダル関連 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner, .login-modal {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid #E5D5C8;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5D5C8;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-modal h2 {
    color: #8B4513;
    margin-bottom: 1rem;
}

.login-modal p {
    color: #5D4037;
    margin-bottom: 1.5rem;
}