* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    display: flex !important;
    min-height: 100vh !important;
    flex-direction: column !important;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Arial, sans-serif !important;
    background: #008080 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
}

.background, .animated-bg, .grid-overlay, .particles { display: none !important; }

header, main, footer {
    position: relative !important;
    z-index: 10 !important;
    background: #008080 !important;
}

main {
    padding: 10px !important;
    padding-bottom: 42px !important;
}

header {
    padding: 10px !important;
}

footer {
    padding: 0 !important;
    background: #c0c0c0 !important;
    border-top: 2px solid #ffffff !important;
    text-align: center !important;
    color: #000000 !important;
    font-size: 11px !important;
    box-shadow: inset 0 1px 0 #ffffff !important;
}

.container { max-width: 100% !important; margin: 0 auto !important; padding: 0 !important; }

.window-box {
    background: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #000000 #000000 #ffffff !important;
    margin-bottom: 10px !important;
}

.address-window .window-title-bar {
    background: linear-gradient(to right, #000080, #1084d0) !important;
    color: #ffffff !important;
    padding: 3px 8px !important;
    font-weight: bold !important;
    font-size: 11px !important;
}

.address-window .window-content {
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.address-display-panel {
    background: #ffffff !important;
    border: 2px solid !important;
    border-color: #808080 #ffffff #ffffff #808080 !important;
    padding: 6px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 11px !important;
    color: #000000 !important;
}

.email-address-text {
    flex: 1 !important;
    font-size: 13px !important;
    font-weight: normal !important;
    color: #000000 !important;
    position: relative !important;
}

.email-address-text::after {
    content: '|' !important;
    animation: blink-cursor 1s step-end infinite !important;
    margin-left: 2px !important;
    font-weight: normal !important;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.button-toolbar {
    display: flex !important;
    gap: 4px !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    padding: 4px !important;
    background: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
}

#btn-favorite {
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    padding: 2px !important;
    background: #c0c0c0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#btn-favorite.favorited {
    background: #ffff00 !important;
    border-color: #ffffff #808080 #808080 #ffffff !important;
}

#btn-favorite.favorited:active {
    border-color: #808080 #ffffff #ffffff #808080 !important;
}

#star-icon {
    font-size: 12px !important;
    line-height: 1 !important;
    color: #000000 !important;
}

.window-title-bar {
    background: linear-gradient(to right, #000080, #1084d0) !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    font-weight: bold !important;
    font-size: 11px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.window-title { 
    flex: 1 !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important; 
}

.window-content {
    padding: 8px !important;
}

.btn, .copy-button, button.btn {
    font-size: 11px !important;
    color: #000000 !important;
    background: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #000000 #000000 #ffffff !important;
    padding: 6px 16px !important;
    font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif !important;
    cursor: pointer !important;
    min-height: 32px !important;
}

.btn:active, .copy-button:active {
    border-color: #000000 #ffffff #ffffff #000000 !important;
}

.email-list-item {
    background: #c0c0c0 !important;
    border: 2px solid !important;
    border-color: #ffffff #000000 #000000 #ffffff !important;
    padding: 8px !important;
    margin-bottom: 4px !important;
    cursor: pointer !important;
}

.email-list-item:hover {
    background: #000080 !important;
    color: #ffffff !important;
}

.email-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.email-modal[style*="display: flex"] {
  display: flex !important;
}

.email-modal .modal-window {
  background: #c0c0c0 !important;
  border: 2px solid !important;
  border-color: #ffffff #000000 #000000 #ffffff !important;
  max-width: 600px !important;
  width: 90% !important;
  max-height: 90vh !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3) !important;
}

.modal-content {
  flex: 1 !important;
  background: #ffffff !important;
  border: 2px solid !important;
  border-color: #808080 #ffffff #ffffff #808080 !important;
  width: calc(100% - 24px) !important;
  align-self: center !important;
  margin: 8px 0 !important;
  padding: 8px !important;
  overflow-y: auto !important;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080 !important;
}

::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #c0c0c0; }
::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #000000 #000000 #ffffff;
}

@media (max-width: 768px) {
    .address-window .window-content {
        padding: 16px !important;
    }
    
    .address-display-panel {
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    .email-address-text {
        font-size: 14px !important;
    }
    
    .button-toolbar {
        gap: 6px !important;
    }
    
    .btn,
    .copy-button {
        min-height: 44px !important;
        padding: 10px 16px !important;
    }
    
    #btn-favorite {
        min-width: 32px !important;
        max-width: 32px !important;
        min-height: 32px !important;
    }
    
    .email-list-item {
        min-height: 56px !important;
        padding: 12px !important;
    }
    
    .modal-window {
        max-width: calc(100% - 20px) !important;
        max-height: calc(100vh - 20px) !important;
    }
    
    .window-close-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 20px !important;
    }
    
    main {
        padding-bottom: 52px !important;
    }
}

*, *::before, *::after {
    animation: none !important;
    transition: none !important;
}

* {
    box-shadow: none !important;
    text-shadow: none !important;
}

.text-muted {
    color: #808080 !important;
}

.float-right {
    float: right !important;
}

hr {
    border: 0;
    height: 2px;
    background: #ffffff;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #ffffff;
    margin: 8px 0;
}