/* 響應式設計 */
@media (max-width: 768px) {
    .result-urls-section{
        width: 100%;
    }
    .result-container {
        margin: 20px 10px;
        padding: 0 10px;
    }

    .result-box {
        padding: 25px 15px;
    }

    .result-success-icon h3 {
        font-size: 20px;
    }

    .result-icon-circle {
        width: 60px;
        height: 60px;
    }

    .result-icon-circle svg {
        width: 30px;
        height: 30px;
    }

    /* 移動設備上改為垂直排列 */
    .result-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .result-qrcode-section {
        width: 100%;
    }

    .result-input-group {
        flex-direction: column;
    }

    .result-copy-button {
        justify-content: center;
    }

    .result-actions {
        justify-content: center;
    }

    .qrcode-download-button {
        width: 100%;
        justify-content: center;
    }

    .toast {
        top: 20px;
        right: 20px;
        left: 20px;
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    .result-box {
        padding: 20px 15px;
    }

    .result-section {
        padding: 12px;
    }

    .result-label {
        font-size: 12px;
    }

    .result-url-display,
    .result-url-input {
        font-size: 13px;
        padding: 10px;
    }

    .result-copy-button {
        font-size: 13px;
        padding: 10px 16px;
    }

    .result-action-button {
        font-size: 13px;
        padding: 8px 16px;
        width: 100%;
        justify-content: center;
    }

    .qrcode-container svg {
        width: 150px;
        height: 150px;
    }
}

/* 結果容器 */
.result-container {
    margin: 40px auto;
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInUp 0.5s ease-out;
}

/* 結果框 */
.result-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
}

/* 成功圖標區域 */
.result-success-icon {
    text-align: center;
    margin-bottom: 30px;
}

.result-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    margin-bottom: 15px;
}

.result-success-icon h3 {
    color: #333;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* 內容包裝器 */
.result-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左側網址區域 */
.result-urls-section {
    flex: 1;
    min-width: 0;
}

/* 結果區塊 */
.result-section {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-original {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.result-shortened {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f9ff 100%);
    border: 1px solid rgba(33, 150, 243, 0.2);
    margin-bottom: 20px;
}

/* 標籤 */
.result-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.result-label-primary {
    color: #1976d2;
}

/* URL 顯示 */
.result-url-display {
    background: white;
    padding: 12px;
    border-radius: 6px;
    word-break: break-all;
    font-size: 14px;
    color: #495057;
    border: 1px solid #dee2e6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-height: 60px;
    overflow-y: auto;
}

/* 輸入組 */
.result-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.result-url-input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    background: white;
    color: #1976d2;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: text;
    transition: all 0.3s ease;
}

.result-url-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* 複製按鈕 */
.result-copy-button {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.result-copy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

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

.result-copy-button svg {
    width: 16px;
    height: 16px;
}

/* 行動按鈕區域 */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.result-action-button {
    background: transparent;
    border: 2px solid #1976d2;
    color: #1976d2;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-action-button:hover {
    background: rgba(33, 150, 243, 0.1);
}

/* 右側 QR Code 區域 */
.result-qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* QR Code 容器 */
.qrcode-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-image {
    display: block;
    max-width: 100%;
    height: auto;
}

/* QR Code 載入中 */
.qrcode-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* QR Code 錯誤 */
.qrcode-error {
    text-align: center;
    color: #dc3545;
}

.qrcode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qrcode-hint {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* QR Code 下載按鈕 */
.qrcode-download-button {
    background: linear-gradient(135deg, #7cb342 0%, #8bc34a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.3);
}

.qrcode-download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.4);
}

.qrcode-download-button svg {
    width: 16px;
    height: 16px;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.toast-hide {
    animation: slideOutRight 0.3s ease-in;
}

/* 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .result-container {
        margin: 20px 10px;
        padding: 0 10px;
    }

    .result-box {
        padding: 30px 20px;
    }

    .result-success-icon h3 {
        font-size: 24px;
    }

    .result-icon-circle {
        width: 60px;
        height: 60px;
    }

    .result-icon-circle svg {
        width: 30px;
        height: 30px;
    }

    .result-input-group {
        flex-direction: column;
    }

    .result-copy-button {
        justify-content: center;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .result-action-button {
        justify-content: center;
    }

    .toast {
        top: 20px;
        right: 20px;
        left: 20px;
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    .result-box {
        padding: 25px 15px;
    }

    .result-section {
        padding: 15px;
    }

    .result-label {
        font-size: 12px;
    }

    .result-url-display,
    .result-url-input {
        font-size: 14px;
        padding: 12px;
    }

    .result-copy-button {
        font-size: 14px;
        padding: 12px 20px;
    }

    .result-action-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}