/* 淨土宗雙月刊 - 現代化分享組件樣式 */

.share-container {
    position: relative;
    margin: 24px 0;
}

.share-btn {
	background: linear-gradient(135deg, #f4e4c1, #e8d5b7);
	color: #8b4513;
	border: 2px solid rgba(218, 165, 32, 0.3);
	padding: 6px 14px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(139, 69, 19, 0.12), 0 2px 4px rgba(218, 165, 32, 0.08);
	font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
	backdrop-filter: blur(8px);
	position: relative;
	overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 248, 220, 0.5), transparent);
    transition: left 0.6s ease;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(139, 69, 19, 0.18),
        0 4px 8px rgba(218, 165, 32, 0.12);
    background: linear-gradient(135deg, #f0d49c, #dcc49a);
    border-color: rgba(218, 165, 32, 0.5);
}

.share-btn:active {
    transform: translateY(0);
    transition: all 0.2s ease;
}

.share-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.share-btn:hover .share-icon {
    transform: scale(1.1) rotate(5deg);
}

.share-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border-radius: 20px;
    box-shadow:
        0 20px 40px rgba(93, 78, 55, 0.12),
        0 8px 16px rgba(93, 78, 55, 0.08),
        0 0 0 1px rgba(212, 184, 150, 0.1);
    padding: 24px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.share-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.share-title {
    font-size: 16px;
    font-weight: 700;
    color: #5d4e37;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.share-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #d4b896, #c8a882);
    border-radius: 2px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    text-decoration: none;
    color: #666;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    background: linear-gradient(145deg, #fafafa, #f5f5f5);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.share-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-option:hover::before {
    opacity: 1;
}

.share-option:hover {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    transform: translateY(-4px);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.share-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: white;
    position: relative;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-option:hover .share-option-icon {
    transform: scale(1.1);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-option-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    z-index: 1;
}

/* 平台特定顏色 - 現代化漸層設計 */
.facebook {
    background: linear-gradient(135deg, #1877f2, #166fe5);
}
.line {
    background: linear-gradient(135deg, #00c300, #00b300);
}
.email {
    background: linear-gradient(135deg, #ea4335, #d93025);
}
.copy {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}
.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.copy-section {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(145deg, #f8f6f3, #f0ede8);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(212, 184, 150, 0.2);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(212, 184, 150, 0.2);
    border-radius: 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.8);
    color: #5d4e37;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.url-input:focus {
    outline: none;
    border-color: #d4b896;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 3px rgba(212, 184, 150, 0.1),
        0 2px 8px rgba(212, 184, 150, 0.15);
}

.copy-btn {
	padding: 10px 18px;
	background: linear-gradient(135deg, #8b5a3c, #7c5233);
	color: white;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(139, 90, 60, 0.2), 0 2px 4px rgba(139, 90, 60, 0.1);
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #a0633d, #8b5a3c);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(139, 90, 60, 0.3),
        0 4px 8px rgba(139, 90, 60, 0.15);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow:
        0 4px 12px rgba(34, 197, 94, 0.3),
        0 2px 4px rgba(34, 197, 94, 0.15);
}



/* 現代化通知樣式 */
.share-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow:
        0 12px 32px rgba(34, 197, 94, 0.2),
        0 4px 12px rgba(34, 197, 94, 0.15);
    transform: translateX(calc(100% + 24px)) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-toast::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.share-toast.show {
    transform: translateX(0) scale(1);
}

/* 現代化響應式設計 */
@media (max-width: 768px) {
    .share-panel {
        left: 50%;
        transform: translateX(-50%) translateY(-16px) scale(0.95);
        min-width: 300px;
        max-width: calc(100vw - 32px);
        padding: 20px;
    }

    .share-panel.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .share-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .share-option {
        padding: 12px 6px;
    }

    .share-option-icon {
        width: 44px;
        height: 44px;
    }

    .share-option-icon svg {
        width: 18px;
        height: 18px;
    }

    .copy-section {
        gap: 10px;
        padding: 14px;
    }

    .url-input {
        font-size: 12px;
        padding: 10px 14px;
    }

    .copy-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .share-toast {
        right: 16px;
        top: 16px;
        padding: 12px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .share-panel {
        left: 0;
        right: 0;
        transform: translateY(-16px) scale(0.95);
        margin: 16px;
        min-width: auto;
        padding: 20px;
        border-radius: 20px;
    }

    .share-panel.active {
        transform: translateY(0) scale(1);
    }

    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .share-option {
        padding: 16px 8px;
        border-radius: 16px;
    }

    .share-option-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .share-option-icon svg {
        width: 20px;
        height: 20px;
    }

    .copy-section {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        border-radius: 16px;
    }

    .copy-btn {
        width: 100%;
        white-space: nowrap;
        min-width: 60px;
        padding: 14px 20px;
        border-radius: 12px;
    }

    .url-input {
        border-radius: 12px;
        padding: 12px 16px;
    }
}

/* 針對極窄螢幕（360px 以下）的現代化優化 */
@media (max-width: 360px) {
    .share-panel {
        margin: 12px;
        padding: 16px;
        border-radius: 18px;
    }

    .share-title {
        font-size: 15px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .share-title::after {
        width: 30px;
        height: 2px;
    }

    .copy-section {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        border-radius: 14px;
    }

    .url-input {
        font-size: 12px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .copy-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 12px;
        white-space: nowrap;
        min-width: 50px;
        border-radius: 10px;
    }

    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

    .share-option {
        padding: 12px 6px;
        font-size: 11px;
        border-radius: 14px;
    }

    .share-option-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        margin-bottom: 6px;
    }

    .share-option-icon svg {
        width: 16px;
        height: 16px;
    }

    .share-toast {
        right: 12px;
        top: 12px;
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 12px;
    }

    .share-btn {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 14px;
    }

    .share-icon {
        width: 16px;
        height: 16px;
    }
}