* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #000000;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #0a0a0a;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ff4444;
    letter-spacing: 3px;
}

.btn-back {
    background: transparent;
    color: #666;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.btn-back:hover {
    color: #ff4444;
    border-color: #ff4444;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    color: #666;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.nav-btn.active {
    background: #ff4444;
    color: white;
}

.nav-btn:hover:not(.active) {
    color: #888;
}

.nav-btn .icon {
    margin-right: 8px;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    padding: 0;
}

.editor-header {
    display: flex;
    gap: 10px;
    margin: 20px 20px 0 20px;
    justify-content: flex-end;
}

.btn-secondary {
    background: #1a1a1a;
    color: #888;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background: #252525;
    color: #aaa;
}

.btn-save {
    background: #2a2a2a;
    color: #aaa;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-save:hover {
    background: #2d5016;
    color: #ccc;
}

.btn-select {
    background: #1a3a1a;
    color: #5aff5a;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-select:hover {
    background: #2d5016;
    color: #7aff7a;
}

.btn-select .icon {
    margin-right: 5px;
}

.btn-secondary .icon {
    margin-right: 5px;
}

.editor-container {
    flex: 1;
    display: flex;
    background: #000000;
    overflow: hidden;
    margin: 20px;
    position: relative;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
}

.line-numbers {
    background: #000000;
    color: #555;
    padding: 15px 15px 15px 20px;
    text-align: right;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    user-select: none;
    min-width: 60px;
    white-space: pre;
    overflow: hidden;
}

.code-editor {
    flex: 1;
    background: #000000;
    color: #cccccc;
    border: none;
    outline: none;
    padding: 15px 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    caret-color: #fff;
}

.code-editor::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.code-editor::-webkit-scrollbar-track {
    background: #000000;
}

.code-editor::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 6px;
}

.code-editor::-webkit-scrollbar-thumb:hover {
    background: #2a2a2a;
}

.sidebar-section {
    width: 350px;
    background: #000000;
    border-left: 1px solid #0a0a0a;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.config-count {
    color: #555;
    font-size: 14px;
}

.new-config {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.new-config input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    color: #666;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
}

.new-config input::placeholder {
    color: #444;
}

.new-config input:focus {
    border-color: #2a2a2a;
    color: #888;
}

.add-btn {
    width: 45px;
    height: 45px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: #1a1a1a;
    color: #888;
}

.library-section h3 {
    font-size: 11px;
    color: #555;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 600;
}

.config-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item {
    background: #0a0a0a;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.config-item:hover {
    background: #111;
}

.config-item.active {
    background: #0a0a0a;
    border-color: #1a1a1a;
}

.config-info {
    flex: 1;
}

.config-item span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    margin-bottom: 5px;
}

.config-item small {
    color: #555;
    font-size: 11px;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ff4444;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.3s;
}

.config-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #1a0000;
    color: #ff6666;
}

.code-editor {
    color: #d4d4d4;
}

.line-numbers,
.code-editor {
    position: relative;
    z-index: 1;
}

.editor-container::before,
.editor-container::after {
    display: none !important;
}

.panel-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.dashboard-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 40px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 30px;
}

.info-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #fff;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #1a1a1a;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: #888;
}

.info-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.info-value.enabled {
    color: #5aff5a;
}

.info-value.disabled {
    color: #ff4444;
}

.subscription-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sub-name {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
}

.sub-status {
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.sub-status.active {
    background: #1a3a1a;
    color: #5aff5a;
}

.sub-expiry {
    font-size: 13px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #1a1a1a;
}

.products-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.products-container {
    max-width: 800px;
    margin: 0 auto;
}

.product-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.product-badge {
    display: inline-block;
    background: #1a5a1a;
    color: #5aff5a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.product-version {
    font-size: 13px;
    color: #888;
}

.btn-download {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #252525;
    border-color: #555;
}

.dashboard-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-welcome {
    max-width: 600px;
    text-align: center;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.welcome-key {
    font-size: 16px;
    color: #888;
    margin-bottom: 40px;
}

.select-product-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 25px;
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-option {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px 30px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.product-option:hover {
    background: #252525;
    border-color: #ff4444;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-box {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #888;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
}

.auth-tab:hover:not(.active) {
    border-color: #555;
    color: #aaa;
}

.auth-form input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    outline: none;
}

.auth-form input::placeholder {
    color: #555;
}

.auth-form input:focus {
    border-color: #ff4444;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-auth {
    width: 100%;
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-auth:hover {
    background: #ff5555;
}

.auth-error {
    color: #ff4444;
    font-size: 13px;
    margin-top: 15px;
    min-height: 20px;
}

.btn-logout {
    background: transparent;
    color: #666;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    color: #ff4444;
    border-color: #ff4444;
}

.change-creds {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.change-creds input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.btn-change-creds {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.change-creds-msg {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}
