/**
 * NiscoVideo - 自定義樣式表
 * 版本號: 1.0.0
 * 日期: 2025-06-16
 */

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* 全局樣式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f5f8fa;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.container {
    padding: 0 15px;
}

/* 頂部導航欄 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, var(--secondary-color), #34495e) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 5px;
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.nav-link.active:after, .nav-link:hover:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero 區塊 */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1200x600/?technology,server') no-repeat center center;
    background-size: cover;
    padding: 120px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.7), rgba(44, 62, 80, 0.7));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 功能卡片 */
.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
}

.icon-wrapper i {
    font-size: 40px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

/* 視頻卡片 */
.video-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.85rem;
}

.video-meta i {
    margin-right: 5px;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 10px;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 頁腳 */
footer {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

footer a:hover {
    color: var(--primary-color) !important;
}

footer .list-unstyled li {
    margin-bottom: 8px;
}

/* 按鈕樣式 */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 響應式調整 */
@media (max-width: 767px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .feature-card, .video-card {
        margin-bottom: 20px;
    }
}

/* 漂浮形狀背景效果 */
.shape {
    position: absolute;
    opacity: 0.05;
    z-index: -1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    border-radius: 40% 60% 70% 30% / 40% 50% 50% 60%;
    background-color: var(--primary-color);
    top: -150px;
    left: -150px;
    animation: morph 15s linear infinite alternate;
}

.shape-2 {
    width: 200px;
    height: 200px;
    border-radius: 50% 50% 70% 30% / 30% 30% 70% 70%;
    background-color: var(--accent-color);
    bottom: -100px;
    right: -100px;
    animation: morph 12s linear infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 50% 60%;
    }
    
    100% {
        border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
    }
}

/* 加載動畫 */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模態框樣式優化 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: none;
}

/* 開發中提示樣式 */
.dev-notice-icon {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
}

.dev-notice-modal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dev-notice-modal .modal-header {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border-bottom: none;
}

.dev-notice-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

/* 連結提示樣式 */
.link-disabled {
    color: #6c757d !important;
    cursor: default;
    position: relative;
}

.link-disabled:hover {
    color: #6c757d !important;
    text-decoration: none;
}
