/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 로그인 창 */
.login-window {
    background: rgba(26, 26, 26, 0.9);
    border-radius: 6px;
    width: 400px;
    height: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* 상단 헤더 */
.header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 15px 0 0 0;
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-text {
    display: flex;
    align-items: center;
    justify-content: center;
}

.char {
    font-size: 22px;
    font-weight: bold;
    color: #FFFFFF;
    opacity: 0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s ease;
}

.close-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #CCCCCC;
    font-size: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #FF4444;
    color: #FFFFFF;
}

/* 메인 콘텐츠 */
.content {
    padding: 10px 25px 0 25px;
}

/* 입력 그룹 */
.input-group {
    margin-bottom: 12px;
}

.input-container {
    position: relative;
    border-bottom: 1px solid #CCCCCC;
    padding-bottom: 8px;
    min-height: 35px;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888888;
    z-index: 1;
    filter: grayscale(100%) brightness(0.8);
}

.placeholder {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 300;
    color: #888888;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1;
}

.input-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #CCCCCC;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    padding: 8px 0;
    margin-left: 50px;
    caret-color: #FFFFFF;
    position: relative;
    z-index: 2;
    height: 35px;
    line-height: 35px;
}

.input-field:focus + .placeholder,
.input-field:not(:placeholder-shown) + .placeholder {
    opacity: 0;
}

/* 옵션들 */
.options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 10px;
}

.action-links {
    display: flex;
    gap: 20px;
}

.action-link {
    font-size: 12px;
    font-weight: 500;
    color: #CCCCCC;
    cursor: pointer;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: #FFFFFF;
}

/* 로그인 버튼 */
.login-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #CCCCCC;
    color: #FFFFFF;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: normal;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-bottom: 0;
    margin-top: 5px;
}

.login-btn:hover {
    background: #333333;
}

.login-btn:active {
    transform: translateY(1px);
}

/* 에러 메시지 */
.error-message {
    font-size: 11px;
    color: #FF6666;
    text-align: center;
    margin-top: 8px;
    min-height: 20px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* 애니메이션 클래스 */
.fade-in {
    opacity: 1 !important;
}

.blink {
    animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* 회원가입 모드 스타일 */
.signup-mode .login-window {
    height: 350px;
}

.signup-mode .login-btn {
    margin-top: -10px;
}

/* 코드 모드 스타일 */
.code-mode .login-window {
    height: 300px;
}

/* 코드 등록 모드 스타일 */
.code-registration-mode .login-window {
    height: 300px;
}

/* 성공 상태 */
.success .login-btn {
    background: #10B981;
    border-color: #10B981;
    color: #FFFFFF;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-window {
        width: 90%;
        max-width: 400px;
    }
    
    .content {
        padding: 15px 20px 0 20px;
    }
    
    .char {
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .login-window {
        width: 95%;
    }
    
    .content {
        padding: 10px 15px 0 15px;
    }
    
    .char {
        font-size: 18px;
    }
    
    .input-field {
        font-size: 14px;
    }
    
    .login-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* 다크 모드 최적화 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    }
}

/* 파란 테두리 완전 제거 */
.input-field:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.input-field:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.input-field:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.login-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.login-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.login-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* 모든 요소의 포커스 테두리 제거 */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

*:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* 브라우저 기본 스타일 제거 */
input, button, textarea, select {
    outline: none !important;
    box-shadow: none !important;
}

input:focus, button:focus, textarea:focus, select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 로딩 상태 */
.loading .login-btn {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading .login-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #CCCCCC;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 메인 앱 화면 스타일 */
.main-app-window {
    background: #0a0a0a;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

/* 앱 헤더 */
.app-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.app-title {
    display: flex;
    align-items: center;
}

.app-logo {
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.app-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}


.logout-btn {
    background: transparent;
    border: 1px solid #CCCCCC;
    color: #CCCCCC;
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #333333;
    color: #FFFFFF;
}

/* 앱 콘텐츠 */
.app-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #CCCCCC;
    font-weight: 300;
}

/* 대시보드 그리드 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.card-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
}

.card-content {
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 14px;
    color: #CCCCCC;
    font-weight: 400;
}

.info-value {
    font-size: 14px;
    color: #FFFFFF;
    font-weight: 500;
}

.status-active {
    color: #10B981 !important;
}

.status-valid {
    color: #10B981 !important;
}

.status-online {
    color: #10B981 !important;
}


/* 텔레그램 API 설정 카드 - 기존 스타일과 일치 */
.telegram-card {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: height 0.3s ease-in-out;
    overflow: hidden;
}

.telegram-card .card-header h3 {
    color: #FFFFFF;
}

.telegram-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.telegram-input-group {
    margin-bottom: 15px;
}

.telegram-input-container {
    position: relative;
    min-height: 45px;
    display: flex;
    align-items: center;
}

.telegram-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #CCCCCC;
    z-index: 2;
    filter: grayscale(100%) brightness(0.8);
}

.telegram-input-field {
    width: 100%;
    height: 45px;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    outline: none !important;
    box-shadow: none !important;
}

.telegram-input-field:focus {
    border-color: #CCCCCC;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(204, 204, 204, 0.2) !important;
}

.telegram-input-field::placeholder {
    color: transparent;
}

.telegram-placeholder {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.telegram-input-field:focus + .telegram-placeholder,
.telegram-input-field:not(:placeholder-shown) + .telegram-placeholder {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateY(-10px);
}

.telegram-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.telegram-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none !important;
    box-shadow: none !important;
}

.telegram-save-btn {
    background: #333333;
    color: #FFFFFF;
    border: 1px solid #555555;
}

.telegram-save-btn:hover {
    background: #444444;
    border-color: #666666;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.telegram-test-btn {
    background: #333333;
    color: #FFFFFF;
    border: 1px solid #555555;
}

.telegram-test-btn:hover {
    background: #444444;
    border-color: #666666;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

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

/* 인증코드 입력칸 애니메이션 */
.telegram-input-group {
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.telegram-input-group.hidden {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.telegram-input-group.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
    margin-bottom: 15px;
}

/* 상태 바 */
.status-bar {
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #888;
    backdrop-filter: blur(10px);
    margin-top: 0;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
}

.status-text {
    font-size: 12px;
    color: #888888;
}

/* 텔레그램 그룹 관리 창 */
.telegram-groups-window {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid #333;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
}

.telegram-groups-window.show {
    transform: translateY(0);
}

.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #333;
    background: rgba(0, 0, 0, 0.3);
}

.groups-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-all-groups-btn,
.deselect-all-groups-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.select-all-groups-btn:hover {
    background: rgba(34, 197, 94, 0.8);
    border-color: rgba(34, 197, 94, 0.8);
    transform: translateY(-1px);
}

.deselect-all-groups-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.8);
    transform: translateY(-1px);
}

.select-all-groups-btn:active,
.deselect-all-groups-btn:active {
    transform: translateY(0);
}

.groups-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.groups-icon {
    font-size: 20px;
}

.groups-title-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.groups-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.groups-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.groups-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    overflow: hidden;
}

.groups-account-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.account-name {
    font-size: 16px;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 5px;
}

.account-phone {
    font-size: 14px;
    color: #888;
}

.groups-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.groups-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.groups-count {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.refresh-groups-btn {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10B981;
    color: #10B981;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-groups-btn:hover {
    background: #10B981;
    color: #fff;
}

.groups-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.groups-list::-webkit-scrollbar {
    width: 6px;
}

.groups-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.groups-list::-webkit-scrollbar-thumb {
    background: #10B981;
    border-radius: 3px;
}

.group-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.group-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.group-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #10B981;
}

.group-label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.group-item:hover {
    border-color: #10B981;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.group-item.selected {
    border-color: #10B981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.group-item.selected .group-name {
    color: #10B981;
    font-weight: 600;
}

.group-item.selected .group-checkbox {
    accent-color: #10B981;
    transform: scale(1.1);
}

.group-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.group-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
}

.group-status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    margin-left: 15px;
}

.group-message-count,
.group-next-send,
.group-auto-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.status-label {
    color: #888;
    font-weight: 500;
}

.status-value {
    color: #fff;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.status-value.success {
    color: #10B981;
    background: rgba(16, 185, 129, 0.2);
}

.status-value.warning {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.2);
}

.status-value.error {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.2);
}

.group-members {
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-type {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.message-sending-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.selected-groups-info {
    margin-bottom: 15px;
}

.selected-groups-count {
    font-size: 16px;
    font-weight: 600;
    color: #10B981;
    display: block;
}

.message-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clear-message-btn {
    background: rgba(108, 117, 125, 0.2);
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-message-btn:hover {
    background: #6c757d;
    color: #fff;
}

.saved-messages-btn {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-messages-btn:hover {
    background: #ffc107;
    color: #000;
}


/* 저장된 메시지 모달 */
.saved-messages-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.saved-messages-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #10B981;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.saved-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.saved-messages-header h3 {
    color: #10B981;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-saved-messages-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-saved-messages-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.saved-messages-list {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.saved-message-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.saved-message-item:hover {
    border-color: #10B981;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.saved-message-content {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.saved-message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.saved-message-delete {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-message-delete:hover {
    background: #dc3545;
    color: #fff;
}


.message-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
    flex: 1;
}

.message-input:focus {
    outline: none;
    border-color: #10B981;
}

.message-input::placeholder {
    color: #666;
}

.message-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.left-buttons {
    display: flex;
    gap: 10px;
}

/* 자동 전송 토글 스위치 */
.message-input-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.auto-send-toggle-container {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-direction: row;
    flex-wrap: wrap;
}

.auto-send-settings-display {
    margin-left: 0;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 11px;
    max-width: 100%;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    box-shadow: none;
}

.settings-info {
    color: #10B981;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInText 0.3s ease-in-out forwards;
}

.settings-info .setting-item {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    margin: 0 2px;
    font-size: 10px;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setting-item {
    display: inline-block;
    opacity: 0;
    animation: fadeInItem 0.4s ease-in-out forwards;
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auto-send-label {
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.auto-send-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.auto-send-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.auto-send-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid #555;
}

.auto-send-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #666;
    transition: 0.3s;
    border-radius: 50%;
}

.auto-send-switch input:checked + .auto-send-slider {
    background-color: #10B981;
    border-color: #10B981;
}

.auto-send-switch input:checked + .auto-send-slider:before {
    transform: translateX(26px);
    background-color: white;
}

.auto-send-switch:hover .auto-send-slider {
    border-color: #10B981;
}

.auto-send-switch input:checked + .auto-send-slider:hover {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* 실시간 진행상황 스타일 */
.progress-section {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #10B981;
    border-radius: 8px;
    margin: 15px 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px 8px 0 0;
}

.progress-header h4 {
    color: #10B981;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-progress-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-progress-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.progress-content {
    padding: 20px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.stat-value.success {
    color: #10B981;
}

.stat-value.error {
    color: #ff4444;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #34D399);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-log {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-log-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.progress-log-item:last-child {
    border-bottom: none;
}

.progress-log-item.success {
    color: #10B981;
}

.progress-log-item.error {
    color: #ff4444;
}

.progress-log-item.info {
    color: #60A5FA;
}

.progress-log-item .log-time {
    color: #888;
    font-size: 12px;
    margin-right: 10px;
    min-width: 60px;
}

.progress-log-item .log-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* 자동 전송 설정 모달 */
.auto-send-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.auto-send-settings-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 25px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #10B981;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.auto-send-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.auto-send-settings-header h3 {
    color: #10B981;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-auto-send-settings-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-auto-send-settings-btn:hover {
    background: #333;
    color: #fff;
}

.auto-send-settings-body {
    margin-bottom: 15px;
}

.setting-section {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid #333;
}

.setting-section h4 {
    color: #10B981;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-item label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.setting-input {
    width: 120px;
    min-width: 80px;
    max-width: 200px;
    padding: 10px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: horizontal;
    overflow: hidden;
}

.setting-input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.setting-description {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.4;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #2a2a2a;
    border: 2px solid #666;
    border-radius: 4px;
    margin-right: 20px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #10B981;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #10B981;
    border-color: #10B981;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.status-display {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    color: #888;
    font-size: 14px;
}

.status-value {
    color: #10B981;
    font-size: 14px;
    font-weight: 600;
}

/* 계정 로테이션 스타일 */
.rotation-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid #333;
}

.rotation-account-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid #444;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rotation-account-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10B981;
}

.rotation-account-item.selected {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10B981;
}

.rotation-account-checkbox {
    margin-right: 15px;
}

.rotation-account-info {
    flex: 1;
}

.rotation-account-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.rotation-account-phone {
    color: #888;
    font-size: 12px;
}

.auto-send-settings-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid #333;
    margin-top: auto;
    flex-shrink: 0;
}

.auto-send-save-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.auto-send-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.send-message-btn, .cancel-message-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.send-message-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
}

.send-message-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.cancel-message-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 1px solid #444;
}

.cancel-message-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 화면 전환 애니메이션 */
.screen-transition {
    transition: opacity 0.3s ease-in-out;
}

.screen-hidden {
    opacity: 0;
    pointer-events: none;
}

.screen-visible {
    opacity: 1;
    pointer-events: auto;
}

/* 인증코드 입력칸 애니메이션 */
#verificationCodeGroup {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
}

#verificationCodeGroup.show {
    opacity: 1;
    transform: translateY(0);
}

#verificationCodeGroup .telegram-input-field {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #10B981;
    color: #10B981;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    font-size: 18px;
}

#verificationCodeGroup .telegram-input-field:focus {
    border-color: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

#verificationCodeGroup .telegram-input-icon {
    color: #10B981;
    font-size: 18px;
}

#verificationCodeGroup .telegram-placeholder {
    color: #10B981;
    font-weight: 500;
}


/* 반응형 디자인 */
@media (max-width: 900px) {
    .main-app-window {
        width: 100vw;
        height: 100vh;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 0 15px;
    }
    
    .app-content {
        padding: 15px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .dashboard-grid {
        gap: 15px;
    }
}
