:root {
    --purple: #8A2BE2;
    --light-purple: #9f44ff;
    --white: #ffffff;
    --shadow: rgba(138, 43, 226, 0.2);
}

body {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', sans-serif;
    background: var(--white);
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 25px 45px;
    box-shadow: 0 0 20px var(--shadow);
    border-radius: 12px;
}

.header h1 {
    text-align: center;
    color: var(--purple);
    font-size: 2.5em;
    text-shadow: 2px 2px 4px var(--shadow);
    margin-bottom: 30px;
}

.main-content {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 0 auto;
    width: calc(100% - 50px);
}

.accounts-window {
    width: 380px;
    height: 280px;
    background: var(--white);
    border: 2px solid var(--purple);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px var(--shadow);
}

.receiver-window {
    width: 205px;
    height: 280px;
    background: var(--white);
    border: 2px solid var(--purple);
    border-radius: 10px;
    padding: 20px 22px 20px 12px;
    box-shadow: 0 0 10px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accounts-window h2, .receiver-window h2 {
    color: var(--purple);
    margin-top: 0;
    font-size: 1.5em;
    border-bottom: 2px solid var(--purple);
    padding-bottom: 10px;
}

.add-account {
    display: grid;
    grid-template-columns: 140px 140px 65px;
    gap: 8px;
    margin-bottom: 15px;
}

.add-account button {
    width: 100%;
    text-align: center;
}

.account-list {
    height: 150px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) var(--white);
    border: 1px solid var(--shadow);
    border-radius: 5px;
    padding: 10px;
}

.account-item {
    display: grid;
    grid-template-columns: 140px 140px 40px;
    gap: 8px;
    align-items: center;
    padding: 6px;
    margin: 5px 0;
    border: 1px solid var(--purple);
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
    animation: slideIn 0.3s ease;
}

.account-item:hover {
    transform: translateX(5px);
    border-color: var(--light-purple);
}

.account-item.removing {
    animation: slideOut 0.3s ease forwards;
}

.acc-username, .acc-password {
    font-size: 0.8em;
    padding: 4px 8px;
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-btn {
    padding: 3px 10px;
    font-size: 0.8em;
}

.receiver-input {
    display: flex;
    gap: 8px;
    margin-top: -8px;
    margin-bottom: 6px;
    margin-right: 5px;
}

.receiver-input input {
    flex: 1;
    min-width: 115px;
    margin-left: -2px;
}

.receiver-input button {
    width: 60px;
    min-width: 60px;
    padding: 6px 8px;
}

.current-receiver {
    font-size: 0.8em;
    color: var(--purple);
    opacity: 0.8;
    margin-top: -8px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.control-btn {
    padding: 12px 40px;
    font-size: 1.2em;
    background: var(--purple);
    color: var(--white);
    border: 2px solid var(--purple);
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 10px var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-btn:hover {
    background: var(--light-purple);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow);
}

.control-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.logs-section {
    margin-top: 20px;
}

.logs-section h2 {
    color: var(--purple);
    margin-bottom: 10px;
}

#logArea {
    height: 200px;
    border: 2px solid var(--purple);
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
    background: #fafafa;
    font-family: monospace;
}

.log-entry {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid var(--shadow);
}

input {
    padding: 8px 12px;
    border: 2px solid var(--purple);
    border-radius: 5px;
    font-size: 0.9em;
    outline: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

input:focus {
    box-shadow: 0 2px 12px var(--shadow);
    transform: translateY(-1px);
}

input[type="password"] {
    font-family: inherit;
    -webkit-text-security: none;
    text-security: none;
}

#giftReceiver::placeholder {
    content: "New Gift Receiver";
}

button {
    border: 2px solid var(--purple);
    background: var(--white);
    color: var(--purple);
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--purple);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.button-success {
    animation: addSuccess 0.5s ease;
}

.kpvp-logo {
    margin-top: auto;
    width: 100%;
    height: 120px;
    object-fit: contain;
    opacity: 1;
    filter: brightness(1.2);
}

@keyframes glow {
    0% { box-shadow: 0 0 0 var(--purple); }
    50% { box-shadow: 0 0 10px var(--purple); }
    100% { box-shadow: 0 0 0 var(--purple); }
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: #4CAF50; }
    100% { transform: scale(1); }
}

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

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

@keyframes addSuccess {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.05);
        background: var(--purple);
        color: var(--white);
    }
    100% { transform: scale(1); }
}
