/**
 * Splash Screen & Welcome Screen Styles
 *
 * @file splash.css
 * @description Professional minimalistic styles for splash and welcome screens
 * @author Inkline Corporation
 * @version 1.0.0
 * @created 2025-10-06
 *
 * THEME:
 * - Blue (#2c3e50, #3498db) and white
 * - Construction/surveying inspired design
 * - 墨出し (ink marking) concept with measuring lines
 */

/* ================================
   SPLASH SCREEN
   ================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.splash-screen.active {
    opacity: 1;
}

.splash-screen.fade-out {
    opacity: 0;
}

.splash-content {
    text-align: center;
    padding: 40px;
    max-width: 500px;
}

/* Logo Container with Surveying Lines */
.splash-logo-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
}

.splash-logo {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Logo Square */
.logo-square {
    width: 100px;
    height: 100px;
    background: white;
    border: 4px solid #3498db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.2);
    position: relative;
    z-index: 2;
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(52, 152, 219, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(52, 152, 219, 0.3);
    }
}

/* Measuring Lines (墨出し Inspired) */
.logo-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.line {
    position: absolute;
    background: linear-gradient(90deg,
        transparent 0%,
        #3498db 20%,
        #3498db 80%,
        transparent 100%);
    opacity: 0;
}

.line-h {
    height: 2px;
    left: 0;
    right: 0;
}

.line-v {
    width: 2px;
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        transparent 0%,
        #3498db 20%,
        #3498db 80%,
        transparent 100%);
}

.line-1 {
    top: 30%;
    animation: line-draw-h 1.5s ease-out 0.3s forwards;
}

.line-2 {
    left: 70%;
    animation: line-draw-v 1.5s ease-out 0.6s forwards;
}

.line-3 {
    bottom: 30%;
    animation: line-draw-h 1.5s ease-out 0.9s forwards;
}

.line-4 {
    right: 70%;
    animation: line-draw-v 1.5s ease-out 1.2s forwards;
}

@keyframes line-draw-h {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 0.6;
        transform: scaleX(1);
    }
}

@keyframes line-draw-v {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 0.6;
        transform: scaleY(1);
    }
}

/* Company Name */
.splash-title {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 0.5s forwards;
}

.splash-subtitle {
    font-size: 18px;
    color: #7f8c8d;
    margin: 0 0 40px 0;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 0.7s forwards;
}

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

/* Loading Section */
.splash-loading {
    margin-top: 40px;
    opacity: 0;
    animation: fade-in 0.5s ease-out 1s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.loading-bar-container {
    width: 100%;
    height: 4px;
    background: #e3f2fd;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.loading-text {
    margin-top: 12px;
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* ================================
   WELCOME SCREEN
   ================================ */

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.welcome-screen.active {
    opacity: 1;
}

.welcome-screen.fade-out {
    opacity: 0;
}

.welcome-content {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    color: white;
}

/* Welcome Logo */
.welcome-logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.welcome-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-logo .logo-square {
    width: 100px;
    height: 100px;
    background: white;
    border: 4px solid #3498db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
    opacity: 0;
    animation: fade-in-scale 0.8s ease-out 0.3s forwards;
}

/* Greeting */
.welcome-greeting {
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 20px 0;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 0.3s forwards;
}

/* Customer Name */
.welcome-name {
    font-size: 42px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #3498db;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    opacity: 0;
    animation: fade-in-scale 0.8s ease-out 0.5s forwards;
}

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

/* Company Name */
.welcome-company {
    font-size: 20px;
    color: #ecf0f1;
    margin: 0 0 30px 0;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 0.7s forwards;
}

/* Welcome Message */
.welcome-message {
    margin: 30px 0;
    opacity: 0;
    animation: fade-in 0.8s ease-out 0.9s forwards;
}

.welcome-message p {
    font-size: 16px;
    line-height: 1.8;
    color: #bdc3c7;
    margin: 8px 0;
}

.data-loading-text {
    font-size: 14px !important;
    color: #3498db !important;
    font-weight: 600 !important;
    margin-top: 15px !important;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Progress Bar */
.welcome-progress {
    width: 100%;
    max-width: 300px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 30px auto 0;
    overflow: hidden;
    opacity: 0;
    animation: fade-in 0.5s ease-out 1s forwards;
}

.welcome-progress-bar {
    height: 100%;
    background: #3498db;
    border-radius: 2px;
    width: 0%;
    animation: progress-auto 2.5s linear forwards;
}

@keyframes progress-auto {
    to {
        width: 100%;
    }
}

/* Success Screen Specific Styles */
.success-check {
    font-size: 72px;
    margin: 20px 0 10px 0;
    opacity: 0;
    animation: success-pop 0.6s ease-out 0.5s forwards;
}

@keyframes success-pop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-main {
    font-size: 20px;
    font-weight: 600;
    margin: 15px 0;
}

.booked-dates-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.booked-dates-label {
    font-size: 14px;
    color: #ecf0f1;
    margin: 0 0 8px 0 !important;
    font-weight: 600;
}

.booked-dates-list {
    font-size: 20px;
    color: #3498db;
    font-weight: bold;
    margin: 0 !important;
    letter-spacing: 0.5px;
}

.callback-message {
    font-size: 18px;
    color: #3498db;
    font-weight: 600;
    margin: 10px 0;
}

.first-time-message {
    margin: 25px 0;
    padding: 20px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border: 2px dashed #3498db;
}

.first-time-message p {
    font-size: 15px;
    line-height: 1.6;
    color: #ecf0f1;
    margin: 5px 0;
}

.reload-button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 1.2s forwards;
}

.reload-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.reload-button:active {
    transform: translateY(0);
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .splash-content,
    .welcome-content {
        padding: 20px;
    }

    .splash-logo-container {
        width: 120px;
        height: 120px;
    }

    .logo-square {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .splash-title {
        font-size: 24px;
    }

    .splash-subtitle {
        font-size: 16px;
    }

    .welcome-logo-container {
        width: 80px;
        height: 80px;
    }

    .welcome-logo .logo-square {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .welcome-greeting {
        font-size: 28px;
    }

    .welcome-name {
        font-size: 32px;
    }

    .welcome-company {
        font-size: 18px;
    }

    .welcome-message p {
        font-size: 14px;
    }

    .success-check {
        font-size: 56px;
    }

    .success-main {
        font-size: 18px;
    }

    .callback-message {
        font-size: 16px;
    }

    .first-time-message p {
        font-size: 14px;
    }

    .reload-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

@media (prefers-reduced-motion: reduce) {
    .splash-screen,
    .welcome-screen,
    .logo-square,
    .line,
    .splash-title,
    .splash-subtitle,
    .splash-loading,
    .loading-bar,
    .welcome-logo .logo-square,
    .welcome-greeting,
    .welcome-name,
    .welcome-company,
    .welcome-message,
    .welcome-progress {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }

    .splash-screen.active,
    .welcome-screen.active,
    .line,
    .splash-title,
    .splash-subtitle,
    .splash-loading,
    .welcome-logo .logo-square,
    .welcome-greeting,
    .welcome-name,
    .welcome-company,
    .welcome-message,
    .welcome-progress {
        opacity: 1 !important;
        transform: none !important;
    }
}
