/* TikTok Money Calculator - Improved Styles */

.tmc-wrapper {
    max-width: 680px;
    margin: 30px auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
}

.tmc-wrapper * {
    box-sizing: border-box;
}

.tmc-main-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #e91e8c;
    margin: 0 0 28px;
    line-height: 1.3;
    padding: 0 8px;
}

/* Search Box */
.tmc-search-box {
    border: 2px dashed #d0d0d0;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    background: #fafafa;
    margin-bottom: 24px;
}

.tmc-search-box label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 500;
}

.tmc-search-box input[type="text"] {
    width: 100%;
    max-width: 360px;
    padding: 13px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.tmc-search-box input[type="text"]:focus {
    border-color: #e91e8c;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}

.tmc-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 13px 32px;
    background: #e91e8c;
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    -webkit-appearance: none;
}

.tmc-btn:hover {
    background: #c91878;
}

.tmc-btn:active {
    transform: scale(0.97);
}

.tmc-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loader */
.tmc-loader {
    text-align: center;
    padding: 36px 20px;
}

.tmc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #e91e8c;
    border-radius: 50%;
    animation: tmc-spin 0.75s linear infinite;
    margin: 0 auto 12px;
}

@keyframes tmc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tmc-loader p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Result Card */
.tmc-result {
    text-align: center;
    animation: tmc-fadeIn 0.35s ease;
}

@keyframes tmc-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tmc-avatar-wrap {
    margin: 8px 0 10px;
}

.tmc-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e91e8c;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.22);
}

.tmc-name {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tmc-verified {
    color: #20d5ec;
    font-size: 16px;
}

.tmc-about-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.tmc-bio {
    font-size: 14px;
    color: #444;
    margin-bottom: 22px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
    padding: 0 8px;
}

/* Earnings Card */
.tmc-earning-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 16px rgba(0,0,0,0.07);
    padding: 20px 16px;
    margin-bottom: 16px;
    border: 1px solid #f0f0f0;
}

.tmc-earning-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tmc-earning-amount {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
}

/* Stats Card */
.tmc-stats-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 16px rgba(0,0,0,0.07);
    padding: 18px 8px;
    display: flex;
    justify-content: space-around;
    border: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.tmc-stat {
    flex: 1;
    text-align: center;
    padding: 4px;
}

.tmc-stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.tmc-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

/* Share Section */
.tmc-share-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.tmc-share-title {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    font-weight: 500;
}

.tmc-share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tmc-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
}

.tmc-share-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.tmc-share-btn svg {
    flex-shrink: 0;
}

.tmc-fb { background: #1877f2; }
.tmc-x  { background: #000000; }
.tmc-wa { background: #25d366; }
.tmc-tt { background: #010101; }

/* Popup */
.tmc-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tmc-fadeIn 0.2s ease;
    padding: 16px;
}

.tmc-popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px 22px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.tmc-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.tmc-popup-close:hover {
    color: #333;
}

.tmc-popup-icon {
    font-size: 44px;
    margin-bottom: 8px;
}

.tmc-popup-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #222;
}

.tmc-popup-content p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.45;
}

.tmc-popup-ok {
    margin-top: 0;
    padding: 11px 36px;
}

/* ========== Mobile Friendly ========== */
@media (max-width: 600px) {
    .tmc-wrapper {
        margin: 16px auto;
        padding: 12px;
    }

    .tmc-main-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .tmc-search-box {
        padding: 18px 14px;
    }

    .tmc-search-box input[type="text"] {
        font-size: 16px;
        padding: 12px 14px;
    }

    .tmc-btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
    }

    .tmc-avatar {
        width: 88px;
        height: 88px;
    }

    .tmc-name {
        font-size: 18px;
    }

    .tmc-earning-amount {
        font-size: 26px;
    }

    .tmc-stats-card {
        flex-direction: row;
        padding: 14px 4px;
    }

    .tmc-stat-value {
        font-size: 16px;
    }

    .tmc-stat-label {
        font-size: 11px;
    }

    .tmc-share-buttons {
        gap: 8px;
    }

    .tmc-share-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1 1 40%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .tmc-stats-card {
        flex-direction: column;
        gap: 12px;
    }

    .tmc-share-btn {
        flex: 1 1 100%;
    }
}

/* Screenshot Area */
.tmc-screenshot-area {
    background: #ffffff;
    padding: 24px 16px 16px;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
}

.tmc-shot-header {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.tmc-shot-logo {
    font-size: 15px;
    font-weight: 700;
    color: #e91e8c;
}

.tmc-shot-url {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.tmc-shot-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #aaa;
    text-align: center;
}

.tmc-download-wrap {
    margin-top: 18px;
    text-align: center;
}

.tmc-download-btn {
    background: #111 !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
}

.tmc-download-btn:hover {
    background: #333 !important;
}

@media (max-width: 600px) {
    .tmc-screenshot-area {
        padding: 18px 12px 12px;
    }
}
