/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    
    /* Neutral Colors */
    --bg-primary: #0a0e27;
    --bg-secondary: #151b3d;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    /* Accent Colors */
    --accent-purple: #a78bfa;
    --accent-pink: #f093fb;
    --accent-blue: #4facfe;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-japanese: 'Noto Sans JP', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-japanese), var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   Background Animation
   =================================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    top: 50%;
    right: -200px;
    animation-delay: 5s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 10px) scale(1.05);
    }
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-icon {
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

.brand-text {
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-weight: 400;
    font-size: 0.9rem;
    opacity: 0.7;
}

.navbar-brand:hover {
    opacity: 0.8;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: var(--spacing-xs);
    position: relative;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}



.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1;
    animation: slideDown 0.8s ease 0.4s backwards;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.subtitle-gradient {
    display: block;
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
    animation: slideDown 0.8s ease 0.6s backwards;
}



/* ===================================
   Apps Section
   =================================== */
.apps-section {
    padding: var(--spacing-xs) 0 var(--spacing-md);
    min-height: auto;
}



.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: 0;
}

.app-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
    animation: fadeInScale 0.5s ease backwards;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.app-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card:hover .app-icon {
    transform: scale(1.05);
}

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-tertiary);
    line-height: 1.2;
}

.app-description {
    display: none;
}

.app-tags {
    display: none;
}

.tag {
    padding: 0.4rem 0.8rem;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-purple);
    font-weight: 500;
}

/* ===================================
   App Detail Section
   =================================== */
.app-detail-section {
    min-height: auto;
    padding: calc(80px + var(--spacing-md)) 0 var(--spacing-md);
    animation: fadeIn 0.5s ease;
}

.app-detail-section.hidden {
    display: none;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-md);
}

.back-button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.detail-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
    animation: slideUp 0.5s ease;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.detail-header-text {
    flex: 1;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.2;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.detail-body {
    line-height: 1.8;
}

.detail-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    white-space: pre-line;
}

.detail-description h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: var(--spacing-md) 0 var(--spacing-xs);
}

.detail-description ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
}

.detail-description p {
    margin-bottom: var(--spacing-xs);
}

.detail-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(102, 126, 234, 0.3);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0 var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.footer-content {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.footer-brand h3 a,
.footer-brand p a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-brand h3 a:hover,
.footer-brand p a:hover {
    color: var(--accent-purple);
}

.footer-brand p {
    color: var(--text-tertiary);
}



.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}

.toast.hidden {
    display: none;
}

.toast i {
    color: #4ade80;
    font-size: 1.2rem;
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(15deg);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .navbar .container {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .brand-icon {
        font-size: 1.5rem;
    }
    
    .hero-section {
        padding-top: 80px;
        min-height: 50vh;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .app-card {
        flex-direction: row;
        align-items: center;
    }
    
    .app-icon {
        width: 60px;
        height: 60px;
    }
    
    .app-name {
        font-size: 1.1rem;
    }
    
    .detail-content {
        padding: var(--spacing-lg);
    }
    
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .detail-title {
        font-size: 2rem;
    }
    
    .detail-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-info {
        grid-template-columns: 1fr;
    }
    
    .toast {
        left: var(--spacing-md);
        right: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .app-card {
        padding: var(--spacing-md);
        flex-direction: row;
        align-items: center;
    }
    
    .app-icon {
        width: 60px;
        height: 60px;
    }
    
    .app-name {
        font-size: 1rem;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .hero-section,
    .footer,
    .toast,
    .back-button {
        display: none;
    }
    
    .app-detail-section {
        padding: 0;
    }
}
