<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>飞鱼_光源控制</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #2d2d2d;
            color: #f0f0f0;
            text-align: center;
        }
        .container {
            display: flex;
            justify-content: center;
            width: 100%;
            margin-top: 20px;
        }
        .light-control {
            width: 70%;
            height: 50px;
            background: linear-gradient(145deg, #2ecc71, #27ae60);
            border: none;
            border-radius: 12px;
            color: white;
            padding: 5px 10px;
            text-align: center;
            text-decoration: none;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 16px;
            font-weight: bold;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
			
			
			
        }
        .light-control::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
            transform: translateX(-100%);
            transition: transform 0.5s ease;
        }
        .light-control:hover::before {
            transform: translateX(100%);
        }
        .light-control:hover {
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
            transform: translateY(-3px);
        }
        .light-control:active {
            transform: translateY(1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .light-control:focus {
            outline: none;
        }
        .light-control .icon {
            width: 24px;
            height: 24px;
            margin-right: 15px;
        }
        .light-control span {
            flex-grow: 1;
            text-align: center;
			
        }
       

		
        
	
			#loginDiv {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				text-align: center;
			}

			#loginForm {
				display: flex;
				flex-direction: column;
				align-items: center;
			}

			.input-group {
				display: flex;
				justify-content: center;
				align-items: center;
				margin-bottom: 10px;
				margin-right: 50px;
			}

			.input-group label {
				margin-right: 10px;
				width: 80px;
				text-align: right;
			}

			#buttonsDiv {
				display: flex;
				/* 使用 Flexbox 布局 */
				justify-content: center;
				/* 水平居中 */
				align-items: center;
				/* 垂直居中（可选，根据需求） */
				height: auto;
				/* 可根据需求调整 */
				width: 100%;
				/* 确保容器宽度充满页面 */
				margin-top: 20px;
			}

			.custom-button {
				margin: 3px;
				/* 按钮间距 */
				width: auto;
				/* 或固定宽度，比如100px */
				height: 25px;
				background-color: #d9d3bb;
				/* 按钮背景色 */
				text-align: center;
				/* 按钮内文字居中 */
			}
		
        
	

		
			#user {
				position: fixed;
				/* 使用 fixed 定位 */
				bottom: 10px;
				/* 距离底部 10px */

				display: flex;
				align-items: center;
			}

			#showusername {
				margin: 0;
				padding: 0;
				margin-right: 11px;
				white-space: nowrap;
				color: #727272;
			}

			#user .custom-logout-button {
				display: inline-block;

				background-color: #424242;
				color: #acacac;
				border: none;
				cursor: pointer;
				border-radius: 5px;
				white-space: nowrap;
				font-size: 8px;
				line-height: normal;
				width: auto;
				/* 覆盖全局样式 */
				height: auto;
				/* 覆盖全局样式 */
			}

			#user .custom-logout-button:hover {
				background-color: #282828;
				color: #e8e8e8;
			}

			#user .custom-logout-button:active {
				background-color: #10171a;
			}
		</style>
        <style>
            h6 {
                margin-top: 12px;
                color: #9d9999;
                text-align: center;
            }
            h6:hover {
                color: #c68316;
            }
            h6:active {
                color: #877616;
            }
        </style>
    
 
</head>
<body>
    <div id="loginDiv">
        <h2>请登录</h2>
        <form id="loginForm">
            <div class="input-group">
                <label for="username">用户名:</label>
                <input type="text" id="username" name="username" required />
            </div>
            <br />
            <div class="input-group">
                <label for="password">密码:</label>
                <input type="password" id="password" name="password" required />
            </div>
            <br />
            <div>
                <input type="button" value="清除登录状态" style="background-color: #d7cf2a" onclick="clearCache()" />
                <input type="submit" value="登录" />
            </div>
        </form>
        <p id="errorMsg" style="color: red"></p>

        <div id="buttonsDiv">
            <button class="custom-button" onclick="showMessage('版权申明')">版权申明</button>
            <button
                class="custom-button"
                onclick="openUrl('https://shop245507834.taobao.com/?spm=pc_detail.29232929/evo365560b447259.shop_popup_block.dentershop.d4aa7dd64XVbs9')">
                购买地址
            </button>
            <button class="custom-button" onclick="showMessage('诚招代理')">诚招代理</button>
        </div>
    </div>

    <div style="line-height: 5px"></div>

    <div id="contentDiv" style="display: none">
		<br>
        <div class="container">
			
            <button id="button5" class="light-control">
                <img src="img/Soleil.png" alt="Soleil" class="icon">
                <span>光源控制</span>
            </button>
       
            <div id="user">
                <!-- <p id="showusername"></p> -->
                <button id="logoutBtn" class="custom-logout-button">退出登录</button>
           
            </div>
        </div>
    </div>
    
    
    
 


    <script src="CSInterface.js"></script>
    
    <script>
        document.getElementById('button1').addEventListener('click', function() {
            csInterface.evalScript('$.evalFile("' + csInterface.getSystemPath('extension') + '/js/22.jsx")');
        });
    </script>
    <script src="main.js"></script>
		
		
		
	  <script>
        document.addEventListener('contextmenu', function(event) {
            event.preventDefault();
        });

        var csInterface = new CSInterface();
        var expectedActivationCode = 0;

        document.addEventListener('DOMContentLoaded', function() {
            checkActivationStatus();
            hideHTMLGuardAd();
        });

        function hideHTMLGuardAd() {
            var divs = document.getElementsByTagName('div');
            Array.from(divs).forEach(function(div) {
                if (div.innerHTML.includes('www.htmlguard.com')) {
                    div.style.display = 'none';
                }
            });
        }

      
    
		  
        function copyToClipboard() {
            var copyText = document.getElementById("textInput");
            copyText.select();
            document.execCommand("copy");
        }

        function hideAllExceptHiddenContent() {
            var inputGroups = document.querySelectorAll('.input-group');
            inputGroups.forEach(function(group) {
                group.style.display = 'none';
            });
            document.getElementById('generateButton').style.display = 'none';
            document.getElementById('serialTitle').style.display = 'none';
        }
		  
		  
		 
		    var csInterface = new CSInterface();
            var fs = require('fs');
            var childProcess = require('child_process');
            var path = require('path');

		  
		  
    </script>

		
		
  <script>
        function callJSX() {
            var csInterface = new CSInterface();
            csInterface.evalScript('main()');
        }

        document.addEventListener('DOMContentLoaded', function() {
            var button = document.getElementById('button5');
            button.addEventListener('click', callJSX);
        });
    </script>
    
		<script>
			// 退出
			var coll = document.getElementsByClassName('collapsible')
			var contents = document.getElementsByClassName('content')
			var i

			for (i = 0; i < coll.length; i++) {
				coll[i].addEventListener('click', function () {
					var content = this.nextElementSibling
					var isOpen = content.style.display === 'block'

					Array.from(contents).forEach(function (c) {
						c.style.display = 'none'
					})

					content.style.display = isOpen ? 'none' : 'block'
				})
			}

			// 申明
			function showMessage(buttonType) {
				if (buttonType === '版权申明') {
					alert('版权申明: 本软件已申请软件著作权和外观著作权\n版权归属：飞鱼后期\n认准正版后续更新无忧')
				} else if (buttonType === '诚招代理') {
					alert('微信号：feiyu6578，备注：代理')
				}
			}

			var cs = new CSInterface()

			function openUrl(a) {
				cs.openURLInDefaultBrowser(a)
			}
		</script>
		
		<script src="./js/login.js"></script>
		
</body>
</html>
